[IPV4]: reset IPCB flags when neccessary
Reset IPSKB_XFRM_TUNNEL_SIZE flags in ipip and ip_gre hard_start_xmit function before the packet reenters IP. This is neccessary so the encapsulated packets are checked not to be oversized in xfrm4_output.c again. Reset all flags in sit when a packet changes its address family. Also remove some obsolete IPSKB flags. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
b05e106698
commit
8cdfab8a43
@@ -381,6 +381,7 @@ static int ipip6_rcv(struct sk_buff *skb)
|
||||
skb->mac.raw = skb->nh.raw;
|
||||
skb->nh.raw = skb->data;
|
||||
memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
|
||||
IPCB(skb)->flags = 0;
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
skb->pkt_type = PACKET_HOST;
|
||||
tunnel->stat.rx_packets++;
|
||||
@@ -552,6 +553,7 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
skb->h.raw = skb->nh.raw;
|
||||
skb->nh.raw = skb_push(skb, sizeof(struct iphdr));
|
||||
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
|
||||
IPCB(skb)->flags = 0;
|
||||
dst_release(skb->dst);
|
||||
skb->dst = &rt->u.dst;
|
||||
|
||||
|
Reference in New Issue
Block a user