summaryrefslogtreecommitdiffstats
path: root/src/bp_sim.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-09-03 05:16:12 +0300
committerimarom <imarom@cisco.com>2015-09-03 05:16:12 +0300
commit1912c95b5480cd601581a00645bb2e75e9c6e7a3 (patch)
tree3ddf98b540677f296f9da7daf9c1e14d0970cc05 /src/bp_sim.cpp
parent6669a4dd3176e21ef8e99fc4a90ecd7a42566be9 (diff)
parent463cb7c212e927a732fb5b702a288a06550c5eb8 (diff)
Merge branch 'master' into rpc
Diffstat (limited to 'src/bp_sim.cpp')
-rwxr-xr-xsrc/bp_sim.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp
index b0d493e1..555696f1 100755
--- a/src/bp_sim.cpp
+++ b/src/bp_sim.cpp
@@ -1294,7 +1294,9 @@ bool CPacketIndication::ConvertPacketToIpv6InPlace(CCapPktRaw * pkt,
void CPacketIndication::ProcessPacket(CPacketParser *parser,
CCapPktRaw * pkt){
_ProcessPacket(parser,pkt);
- UpdateOffsets(); /* update fast offsets */
+ if ( m_desc.IsValidPkt() ){
+ UpdateOffsets(); /* update fast offsets */
+ }
}
@@ -2119,7 +2121,13 @@ int CCapFileFlowInfo::load_cap_file(std::string cap_file,uint16_t _id,uint8_t pl
}
}
+ }else{
+ printf("ERROR packet %d is not supported, should be IP(0x0800)/TCP/UDP format try to convert it using Wireshark !\n",cnt);
+ exit(-1);
}
+ }else{
+ printf("ERROR packet %d is not supported, should be IP(0x0800)/TCP/UDP format try to convert it using Wireshark !\n",cnt);
+ exit(-1);
}
}
@@ -4553,6 +4561,7 @@ void CCPortLatency::reset(){
m_tx_pkt_err=0;
m_tx_pkt_ok =0;
m_pkt_ok=0;
+ m_rx_check=0;
m_no_magic=0;
m_unsup_prot=0;
m_no_id=0;