* [PATCH net] ipv6: gre: fix wrong skb->protocol in WCCP
@ 2014-11-24 10:25 Daniel Borkmann
2014-11-24 21:11 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Borkmann @ 2014-11-24 10:25 UTC (permalink / raw)
To: davem; +Cc: hannes, netdev, Yuri Chislov, Dmitry Kozlov
From: Yuri Chislov <yuri.chislov@gmail.com>
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 <xeb@mail.ru>
Signed-off-by: Yuri Chislov <yuri.chislov@gmail.com>
Tested-by: Yuri Chislov <yuri.chislov@gmail.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
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(-)
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 4564e1f..0e32d2e 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -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;
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ipv6: gre: fix wrong skb->protocol in WCCP
2014-11-24 10:25 [PATCH net] ipv6: gre: fix wrong skb->protocol in WCCP Daniel Borkmann
@ 2014-11-24 21:11 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-24 21:11 UTC (permalink / raw)
To: dborkman; +Cc: hannes, netdev, yuri.chislov, xeb
From: Daniel Borkmann <dborkman@redhat.com>
Date: Mon, 24 Nov 2014 11:25:15 +0100
> From: Yuri Chislov <yuri.chislov@gmail.com>
>
> 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 <xeb@mail.ru>
> Signed-off-by: Yuri Chislov <yuri.chislov@gmail.com>
> Tested-by: Yuri Chislov <yuri.chislov@gmail.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> ---
> Also checked back with Dmitry, it was a copy-paste error from the
> IPv4 implementation.
Good catch, applied, thanks Faniel.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-24 21:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-24 10:25 [PATCH net] ipv6: gre: fix wrong skb->protocol in WCCP Daniel Borkmann
2014-11-24 21:11 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).