-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove all the header in the correct way #79
Conversation
Roy-Hu
commented
May 9, 2023
- perform ip4_rm_header before the gtp5g_push_header in the gtp5g_fwd_skb_ipv4 to prevent calculate the volume of the pushed header
- Not sure why pskb_may_pull in gtp1u_udp_encap_recv do not move the skb->data & skb-len forward hdrlen. Therefore, instead of deducting the Ipv4 & TCP header under GPRS tunneling protocol, it repeatedly deducts the hdrlen.
src/gtpu/pktinfo.c
Outdated
} | ||
volume = skb->len; | ||
if (hdrlen == 0) { | ||
// packets from N6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// packets without gtp header
src/gtpu/pktinfo.c
Outdated
iph = ip_hdr(skb); | ||
volume -= network_and_transport_header_len(skb_copy); | ||
} else if (hdrlen > 0) { | ||
// packets from N3/N9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// packets with gtp header
src/gtpu/pktinfo.c
Outdated
volume = skb->len; | ||
if (hdrlen == 0) { | ||
// packets without gtp header | ||
iph = ip_hdr(skb); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iph
no use anymore and can be removed.