ipv6: gre: fix wrong skb->protocol in WCCP
Subsystems (3)
PATCH 1/1 ipv6: gre: fix wrong skb->protocol in WCCP
From: Yuri Chislov <[email protected]>
When using GRE redirection in WCCP, it sets the wrong skb->protocol, that is, ETH_P_IP instead of ETH_P_IPV6 for the encapuslated traffic.
Fixes c12b395a4664 ("gre: Support GRE over IPv6")
Cc Dmitry Kozlov <[email protected]>
Signed-off-by Yuri Chislov <[email protected]>
Tested-by Yuri Chislov <[email protected]>
Signed-off-by Daniel Borkmann <[email protected]>
---
Also checked back with Dmitry, it was a copy-paste error from the IPv4 implementation.
net/ipv6/ip6_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv6/ip6_gre.c +2 -2
@@ -502,11 +502,11 @@ static int ip6gre_rcv(struct sk_buff *skb) skb->protocol = gre_proto;/* WCCP version 1 and 2 protocol decoding. -* - Change protocol to IP +* - Change protocol to IPv6 * - When dealing with WCCPv2, Skip extra 4 bytes in GRE header */ if (flags ==0 && gre_proto ==htons (ETH_P_WCCP )) { - skb->protocol =htons (ETH_P_IP ); + skb->protocol =htons (ETH_P_IPV6 );if ((*(h + offset) &0xF0 ) !=0x40 ) offset +=4 ; }
Signature · 1 line
1.7.11.7
David Miller
maintainerFrom: Daniel Borkmann <[email protected]>
Date: Mon, 24 Nov 2014 11:25:15 +0100
Quoted 5 lines
From: Yuri Chislov <[email protected]>
When using GRE redirection in WCCP, it sets the wrong
skb->protocol, that is,ETH_P_IPinstead ofETH_P_IPV6for the encapuslated traffic.
Quoted 8 lines
Fixes c12b395a4664 ("gre: Support GRE over IPv6")Cc Dmitry Kozlov <[email protected]>Signed-off-by Yuri Chislov <[email protected]>Tested-by Yuri Chislov <[email protected]>Signed-off-by Daniel Borkmann <[email protected]>---
Also checked back with Dmitry, it was a copy-paste error from the IPv4 implementation.
Good catch, applied, thanks Faniel.