Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ip6_udp_tunnel: remove unused IPCB related codes

Some IPCB fields are currently set in udp_tunnel6_xmit_skb(), which are
never used before it reaches ip6tunnel_xmit(), and past that point the
control buffer is no longer interpreted as IPCB.

This clears these unused IPCB related codes. Currently there is no skb
scrubbing in ip6_udp_tunnel, otherwise IPCB(skb)->opt might need to be
cleared for IPv4 packets, as shown in 5146d1f1511
("tunnel: Clear IPCB(skb)->opt before dst_link_failure called").

Signed-off-by: Eli Cooper <elicooper@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eli Cooper and committed by
David S. Miller
4fd19c15 23f4ffed

-3
-3
net/ipv6/ip6_udp_tunnel.c
··· 88 88 89 89 uh->len = htons(skb->len); 90 90 91 - memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); 92 - IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED 93 - | IPSKB_REROUTED); 94 91 skb_dst_set(skb, dst); 95 92 96 93 udp6_set_csum(nocheck, skb, saddr, daddr, skb->len);