Skip to content

Commit

Permalink
fixed outer ip checksum in gtpu
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomo Yaakov <syaakov@cisco.com>
  • Loading branch information
syaakov committed Jun 15, 2021
1 parent 127fb3a commit 380be9d
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 0 deletions.
Binary file modified scripts/exp/tcp2_http_vlan_gtpu_c.pcap
Binary file not shown.
Binary file modified scripts/exp/tcp2_http_vlan_gtpu_s.pcap
Binary file not shown.
Binary file modified scripts/exp/tunnel_prepend.pcap
Binary file not shown.
Binary file modified scripts/exp/tunnel_prepend_ipv4_with_ipv6.pcap
Binary file not shown.
Binary file modified scripts/exp/tunnel_prepend_ipv4_with_vlan_ipv6.pcap
Binary file not shown.
Binary file modified scripts/exp/tunnel_prepend_with_vlan.pcap
Binary file not shown.
2 changes: 2 additions & 0 deletions src/tunnels/gtp_man.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ int CGtpuMan::prepend_ipv4_tunnel(rte_mbuf * pkt, uint8_t l4_offset, uint16_t in
/*Fix outer header IPv4 length */
outer_ipv4->setTotalLength((uint16_t)(pkt->pkt_len - ETH_HDR_LEN));
}
/*Fix ipv4 checksum*/
outer_ipv4->updateCheckSumFast();
/*Fix UDP header length */
UDPHeader* udp = (UDPHeader *)((uint8_t *)outer_ipv4 + IPV4_HDR_LEN);
udp->setSourcePort(tch->getSourcePort());
Expand Down

0 comments on commit 380be9d

Please sign in to comment.