gtp: reset network header after decapsulation

ip_rcv() needs that the new network header after decapsulation is
set to approapriately set the transport header pointer.
This commit is contained in:
Pablo Neira Ayuso 2014-02-09 21:25:51 +01:00
parent b968ddf47f
commit b45621e1cf
1 changed files with 4 additions and 0 deletions

4
gtp.c
View File

@ -283,6 +283,8 @@ static int gtp0_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
/* get rid of the GTP header */
__skb_pull(skb, sizeof(*gtp0));
skb_reset_network_header(skb);
/* We're about to requeue the skb, so return resources
* to its current owner (a socket receive buffer).
*/
@ -379,6 +381,8 @@ static int gtp1u_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
/* get rid of the GTP header */
__skb_pull(skb, sizeof(*gtp1));
skb_reset_network_header(skb);
/* FIXME: check if the inner IP header has the source address
* assigned to the current MS */