diff options
author | Hanoh Haim <hhaim@cisco.com> | 2015-09-20 17:34:55 +0300 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2015-09-20 17:34:55 +0300 |
commit | 3fe28431157f7b2ed2ed8184ed85017c42a4cb6c (patch) | |
tree | 41fa17684842885e1664cc63ff1520157f191261 /src/bp_sim.cpp | |
parent | 588bb20e9c8f8438db4eb3e8db85111f41bd7306 (diff) | |
parent | 28fef018f75b5a54ac69ac7c919127bf47f5b61f (diff) |
Merge branch 'master' of csi-sceasr-b45:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core into wen
Diffstat (limited to 'src/bp_sim.cpp')
-rwxr-xr-x | src/bp_sim.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp index fca517cf..7cbeb09d 100755 --- a/src/bp_sim.cpp +++ b/src/bp_sim.cpp @@ -1148,13 +1148,6 @@ void CPacketIndication::ProcessIpPacket(CPacketParser *parser, } offset += ip_header_length; - if (!l3.m_ipv4->isChecksumOK() ){ - m_cnt->m_ip_checksum_error++; - } - if( l3.m_ipv4->isMulticast() ){ - m_cnt->m_ip_multicast_error++; - return; - } if( l3.m_ipv4->getTimeToLive() ==0 ){ m_cnt->m_ip_ttl_is_zero_error++; @@ -1177,10 +1170,19 @@ void CPacketIndication::ProcessIpPacket(CPacketParser *parser, return; } + if ( m_packet->pkt_len > MAX_BUF_SIZE -FIRST_PKT_SIZE ){ + m_cnt->m_tcp_udp_pkt_length_error++; + printf("ERROR packet is too big, not supported jumbo packets that larger than %d \n",MAX_BUF_SIZE); + return; + } + // Set packet length and include padding if needed m_packet->pkt_len = l3.m_ipv4->getTotalLength() + getIpOffset(); if (m_packet->pkt_len < 60) { m_packet->pkt_len = 60; } + + + m_cnt->m_valid_udp_tcp++; m_payload_len = l3.m_ipv4->getTotalLength() - (payload_offset_from_ip); m_payload = (uint8_t *)(packetBase +offset); |