summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-08-03 14:01:06 +0300
committerimarom <imarom@cisco.com>2016-08-03 15:03:09 +0300
commit5bbf8a6df83708bd23226139d0e641b835e87e88 (patch)
tree567a1f1336fb07611bdfd0f3e001442c2a1584c6 /src/common
parent35ab1e1766baedee576d282c928ac37b42f66e8d (diff)
push_remote with all packet times zero sends only one packet
fix for #trex-235
Diffstat (limited to 'src/common')
-rwxr-xr-xsrc/common/pcap.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/pcap.cpp b/src/common/pcap.cpp
index a68fb620..8e9bf0ac 100755
--- a/src/common/pcap.cpp
+++ b/src/common/pcap.cpp
@@ -154,18 +154,18 @@ bool LibPCapReader::ReadPacket(CCapPktRaw *lpPacket)
if (m_is_flip) {
flip(&pkt_header);
}
- if (pkt_header.len > READER_MAX_PACKET_SIZE) {
+ if (pkt_header.caplen > READER_MAX_PACKET_SIZE) {
/* cannot read this packet */
//printf("ERROR packet is too big, bigger than %d \n",READER_MAX_PACKET_SIZE);
return false;
}
- lpPacket->pkt_len = fread(lpPacket->raw,1,pkt_header.len,m_file_handler);
+ lpPacket->pkt_len = fread(lpPacket->raw,1,pkt_header.caplen,m_file_handler);
lpPacket->time_sec = pkt_header.ts.sec;
lpPacket->time_nsec = pkt_header.ts.msec*1000;
- if ( lpPacket->pkt_len < pkt_header.len) {
+ if ( lpPacket->pkt_len < pkt_header.caplen) {
lpPacket->pkt_len = 0;
return false;
}