Commit f586488c8825e4c1193a76653a89102a8ff8625a

Authored by Yuri Chislov
Committed by Greg Kroah-Hartman
1 parent 3358f1a698

ipv6: gre: fix wrong skb->protocol in WCCP

[ Upstream commit be6572fdb1bfbe23b2624d477de50af50b02f5d6 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -508,11 +508,11 @@
508 508  
509 509 skb->protocol = gre_proto;
510 510 /* WCCP version 1 and 2 protocol decoding.
511   - * - Change protocol to IP
  511 + * - Change protocol to IPv6
512 512 * - When dealing with WCCPv2, Skip extra 4 bytes in GRE header
513 513 */
514 514 if (flags == 0 && gre_proto == htons(ETH_P_WCCP)) {
515   - skb->protocol = htons(ETH_P_IP);
  515 + skb->protocol = htons(ETH_P_IPV6);
516 516 if ((*(h + offset) & 0xF0) != 0x40)
517 517 offset += 4;
518 518 }