PROBLEM: GRE forwarding not working with 3.10.x, WCCPv2 and Cisco 7200 Router showing IP0 bad-hlen 4 in tcpdump
Subsystems (3)
Hi,
I have a setup with the current kernel (3.10.16) and can't get WCCPv2 to work using GRE since kernel 3.10.x. With 3.9.x everything was working fine.
My setup is simple with three boxes included:
Client (10.111.111.222/24) -- (10.111.111.1/24) Cisco 7200 (192.168.180.113/24) -- Internet Gateway (192.168.234.1/30)
|
WCCPv2
|
(192.168.234.2/30)
Caching Box with Squid 2.7STABLE9 WCCPv2
On the caching box, I have the interfaces:
6: eth3 inet 192.168.234.2/30 scope global eth3\ valid_lft forever preferred_lft forever 22: wccp104102 inet 192.168.234.2/32 scope global wccp104102\ valid_lft forever preferred_lft forever
The WCCP handshake is established and I can see messages on the Cisco Router:
*Oct 14 10:44:09.487: %WCCP-5-SERVICEFOUND: Service 80 acquired on WCCP client 192.168.234.2 *Oct 14 10:44:09.495: %WCCP-5-SERVICEFOUND: Service 90 acquired on WCCP client 192.168.234.2
When the client now starts a request, it gets connection timeouts:
Quoted 1 line
wget google.com
--2013-10-14 13:53:30-- http://google.com/
Resolving google.com (google.com)... 173.194.70.113, 173.194.70.100, 173.194.70.138, ...
Connecting to google.com (google.com)|173.194.70.113|:80... failed: Connection timed out. Connecting to google.com (google.com)|173.194.70.100|:80... failed: Connection timed out.
...
A tcpdump on the Caching Box reveals the following:
Quoted 1 line
tcpdump -i eth3 -n proto gre
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth3, link-type EN10MB (Ethernet), capture size 96 bytes 13:53:35.686377 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:53:36.678849 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:53:38.682782 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:53:42.690670 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:53:50.714444 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:06.745979 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:38.813539 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:39.808525 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:41.812964 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:45.816337 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e
Quoted 1 line
tcpdump -i wccp104102 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wccp104102, link-type LINUX_SLL (Linux cooked), capture size 96 bytes 13:53:35.686377 IP0 bad-hlen 4
13:53:36.678849 IP0 bad-hlen 4
13:53:38.682782 IP0 bad-hlen 4
13:53:42.690670 IP0 bad-hlen 4
13:53:50.714444 IP0 bad-hlen 4
13:54:06.745979 IP0 bad-hlen 4
13:54:38.813539 IP0 bad-hlen 4
13:54:39.808525 IP0 bad-hlen 4
13:54:41.812964 IP0 bad-hlen 4
13:54:45.816337 IP0 bad-hlen 4
So I get correct GRE packets on the eth3 interface, but only bad-hlen messages from the GRE interface.
ver_linux from the Caching box:
Linux cache 3.10.16-x86 #1 SMP Mon Oct 14 06:33:21 CEST 2013 i686 GNU/Linux
Gnu C 4.4.3
Gnu make 3.81
binutils 2.20.1
util-linux 2.17.2
mount 2.15.1-rc1
module-init-tools 3.11.1
e2fsprogs 1.42.7
PPP 2.4.5
Linux C Library 2.11.1
Dynamic linker (ldd) 2.11.1
Procps 3.2.8
Net-tools 1.60
Kbd 1.15
Sh-utils 7.4
Modules Loaded xt_TPROXY nf_tproxy_core xt_set xt_socket nf_defrag_ipv6 xt_REDIRECT ip_set_hash_ip hwmon_vid hwmon bridge ip_set iptable_nat nf_nat_ipv4 ipt_REJECT nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_nat nf_conntrack_ftp ip_gre gre bonding pcspkr uhci_hcd ehci_pci ehci_hcd lpc_ich mfd_core pata_acpi ata_generic
Has anybody an idea of what's going wrong here? If you need any further information or some pcap files, I will surely provide them.
Thanks a lot for your attention!
Best regards,
Peter
Quoted 82 lines · Peter Schmitt
Hi,
I have a setup with the current kernel (3.10.16) and can't get WCCPv2 to work using GRE since kernel 3.10.x. With 3.9.x everything was working fine.
My setup is simple with three boxes included:
Client (10.111.111.222/24) -- (10.111.111.1/24) Cisco 7200 (192.168.180.113/24) -- Internet Gateway
(192.168.234.1/30) | WCCPv2 | (192.168.234.2/30) Caching Box with Squid 2.7STABLE9 WCCPv2On the caching box, I have the interfaces:
6: eth3 inet 192.168.234.2/30 scope global eth3\valid_lftforeverpreferred_lftforever 22: wccp104102 inet 192.168.234.2/32 scope global wccp104102\valid_lftforeverpreferred_lftforeverThe WCCP handshake is established and I can see messages on the Cisco Router:
*Oct 14 10:44:09.487: %WCCP-5-SERVICEFOUND: Service 80 acquired on WCCP client 192.168.234.2 *Oct 14 10:44:09.495: %WCCP-5-SERVICEFOUND: Service 90 acquired on WCCP client 192.168.234.2When the client now starts a request, it gets connection timeouts:
Quoted 1 line
wget google.com
--2013-10-14 13:53:30-- http://google.com/
Resolving google.com (google.com)... 173.194.70.113, 173.194.70.100, 173.194.70.138, ...Connecting to google.com (google.com)|173.194.70.113|:80... failed: Connection timed out. Connecting to google.com (google.com)|173.194.70.100|:80... failed: Connection timed out....
A tcpdump on the Caching Box reveals the following:
Quoted 1 line
tcpdump -i eth3 -n proto gre
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth3, link-type EN10MB (Ethernet), capture size 96 bytes 13:53:35.686377 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:53:36.678849 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:53:38.682782 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:53:42.690670 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:53:50.714444 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:06.745979 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:38.813539 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:39.808525 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:41.812964 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e 13:54:45.816337 IP 192.168.234.1 > 192.168.234.2: GREv0, length 68: gre-proto-0x883e
Quoted 1 line
tcpdump -i wccp104102 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wccp104102, link-typeLINUX_SLL(Linux cooked), capture size 96 bytes 13:53:35.686377 IP0 bad-hlen 4
13:53:36.678849 IP0 bad-hlen 4
13:53:38.682782 IP0 bad-hlen 4
13:53:42.690670 IP0 bad-hlen 4
13:53:50.714444 IP0 bad-hlen 4
13:54:06.745979 IP0 bad-hlen 4
13:54:38.813539 IP0 bad-hlen 4
13:54:39.808525 IP0 bad-hlen 4
13:54:41.812964 IP0 bad-hlen 4
13:54:45.816337 IP0 bad-hlen 4
So I get correct GRE packets on the eth3 interface, but only bad-hlen messages from the GRE interface.
ver_linuxfrom the Caching box:Linux cache 3.10.16-x86 #1 SMP Mon Oct 14 06:33:21 CEST 2013 i686 GNU/Linux
Gnu C 4.4.3
Gnu make 3.81
binutils 2.20.1
util-linux 2.17.2
mount 2.15.1-rc1
module-init-tools 3.11.1
e2fsprogs 1.42.7
PPP 2.4.5
Linux C Library 2.11.1
Dynamic linker (ldd) 2.11.1
Procps 3.2.8
Net-tools 1.60
Kbd 1.15
Sh-utils 7.4
Modules Loadedxt_TPROXYnf_tproxy_corext_setxt_socketnf_defrag_ipv6xt_REDIRECTip_set_hash_iphwmon_vidhwmon bridgeip_setiptable_natnf_nat_ipv4ipt_REJECTnf_nat_ircnf_conntrack_ircnf_nat_ftpnf_natnf_conntrack_ftpip_gregre bonding pcspkruhci_hcdehci_pciehci_hcdlpc_ichmfd_corepata_acpiata_generic
Quoted 3 lines
Has anybody an idea of what's going wrong here? If you need any further information or some pcap files, I will surely provide them.
Thanks a lot for your attention!
3.10 is buggy (for ETH_P_WCCP support I mean), 3.11 has the probable fix :
commit 3d7b46cd20e300bd6989fb1f43d46f1b9645816e ("ip_tunnel: push generic protocol handling to ip_tunnel module.")
The problem is 3.10 do not pull the extra 4 bytes of WCCP
This is now properly done in iptunnel_pull_header()
Hi,
Quoted 11 lines
3.10 is buggy (for
ETH_P_WCCPsupport I mean), 3.11 has the probable fix :commit
3d7b46cd20e300bd6989fb1f43d46f1b9645816e("ip_tunnel: push generic protocol handling toip_tunnelmodule.")The problem is 3.10 do not pull the extra 4 bytes of WCCP
This is now properly done in
iptunnel_pull_header()
First of all, many thanks for your help on this.
I tried to apply the fix to the 3.10.16 sources, as I would like to stay with the long-term line. Unfortunately it does not apply, as there are a lot of dependencies on other patches.
Do you think there will be a fix for the long-time 3.10 kernel line? Or can you guide me on how to apply this fix to the long-term kernel?
Best regards,
Peter
Quoted 15 lines · Peter Schmitt
Hi,
Quoted 11 lines
3.10 is buggy (for
ETH_P_WCCPsupport I mean), 3.11 has the probable fix :commit
3d7b46cd20e300bd6989fb1f43d46f1b9645816e("ip_tunnel: push generic protocol handling toip_tunnelmodule.")The problem is 3.10 do not pull the extra 4 bytes of WCCP
This is now properly done in
iptunnel_pull_header()
Quoted 8 lines
First of all, many thanks for your help on this.
I tried to apply the fix to the 3.10.16 sources, as I would like to stay with the long-term line. Unfortunately it does not apply, as there are a lot of dependencies on other patches.
Do you think there will be a fix for the long-time 3.10 kernel line? Or can you guide me on how to apply this fix to the long-term kernel?
3.10 is right in the middle of GRE refactoring, and many bugs are in it.
It might be very painful to get a complete list of patches to backport.
Hi,
Quoted 24 lines · Eric Dumazet
Quoted 10 lines · Peter Schmitt
Hi,
Quoted 6 lines
3.10 is buggy (for
ETH_P_WCCPsupport I mean), 3.11 has the probable fix :commit
3d7b46cd20e300bd6989fb1f43d46f1b9645816e("ip_tunnel: push generic protocol handling toip_tunnelmodule.")
Quoted 12 lines
Quoted 5 lines
The problem is 3.10 do not pull the extra 4 bytes of WCCP
This is now properly done in
iptunnel_pull_header()First of all, many thanks for your help on this.
I tried to apply the fix to the 3.10.16 sources, as I would like to stay with the long-term line. Unfortunately it does not apply, as there are a lot of dependencies on other patches.
Quoted 6 lines
Quoted 2 lines
Do you think there will be a fix for the long-time 3.10 kernel line? Or can you guide me on how to apply this fix to the long-term kernel?
3.10 is right in the middle of GRE refactoring, and many bugs are in it.
It might be very painful to get a complete list of patches to backport.
thanks again. Yes I saw that there were lots of changes.
Do you think there will be a fix for all the 3.10.x stable long term kernel users? Many of them might not be able to use some newer kernel easily or will this be a "won't fix"?
Best regards,
Peter
Hi Peter,
I think its easy to fix this case, Can you try attached patch? If it works I will send formal patch for stable.
Thanks,
Pravin.
Quoted 33 lines · Peter Schmitt
Hi,
Quoted 29 lines · Eric Dumazet
Quoted 10 lines · Peter Schmitt
Hi,
Quoted 6 lines
3.10 is buggy (for
ETH_P_WCCPsupport I mean), 3.11 has the probable fix :commit
3d7b46cd20e300bd6989fb1f43d46f1b9645816e("ip_tunnel: push generic protocol handling toip_tunnelmodule.")
Quoted 6 lines
Quoted 5 lines
The problem is 3.10 do not pull the extra 4 bytes of WCCP
This is now properly done in
iptunnel_pull_header()Quoted 8 lines
First of all, many thanks for your help on this.
I tried to apply the fix to the 3.10.16 sources, as I would like to stay with the long-term line. Unfortunately it does not apply, as there are a lot of dependencies on other patches.
Do you think there will be a fix for the long-time 3.10 kernel line? Or can you guide me on how to apply this fix to the long-term kernel?
3.10 is right in the middle of GRE refactoring, and many bugs are in it.
Quoted 9 lines
Quoted 1 line
It might be very painful to get a complete list of patches to backport.
thanks again. Yes I saw that there were lots of changes.
Do you think there will be a fix for all the 3.10.x stable long term kernel users? Many of them might not be able to use some newer kernel easily or will this be a "won't fix"?
Best regards,
Peter
From 60e0148f424a8bee987f8c606c4ac23cbe70a567 Mon Sep 17 00:00:00 2001
From: Pravin B Shelar <[email protected]>
Date: Fri, 25 Oct 2013 08:19:59 -0700
Subject: [PATCH] ip_gre: Fix WCCPv2 header parsing.
Pull currect header-len for gre packet.
--- include/net/ip_tunnels.h | 2 +- net/ipv4/ip_gre.c | 2 +- net/ipv4/ip_tunnel.c | 4 ++-- net/ipv4/ipip.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
include/net/ip_tunnels.h +1 -1
@@ -113,7 +113,7 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn, __be32 key);int ip_tunnel_rcv (struct ip_tunnel *tunnel,struct sk_buff *skb, -const struct tnl_ptk_info *tpi,bool log_ecn_error); +const struct tnl_ptk_info *tpi,int hdr_len,bool log_ecn_error);int ip_tunnel_changelink (struct net_device *dev,struct nlattr *tb[],struct ip_tunnel_parm *p); int ip_tunnel_newlink(struct net_device *dev, struct nlattr *tb[],
net/ipv4/ip_gre.c +1 -1
@@ -335,7 +335,7 @@ static int ipgre_rcv(struct sk_buff *skb) iph->saddr, iph->daddr, tpi.key);if (tunnel) { -ip_tunnel_rcv (tunnel, skb, &tpi, log_ecn_error); +ip_tunnel_rcv (tunnel, skb, &tpi, hdr_len, log_ecn_error);return 0 ; }icmp_send (skb,ICMP_DEST_UNREACH ,ICMP_PORT_UNREACH ,0 );
net/ipv4/ip_tunnel.c +2 -2
@@ -402,7 +402,7 @@ static struct ip_tunnel *ip_tunnel_create(struct net *net, }int ip_tunnel_rcv (struct ip_tunnel *tunnel,struct sk_buff *skb, -const struct tnl_ptk_info *tpi,bool log_ecn_error) +const struct tnl_ptk_info *tpi,int hdr_len,bool log_ecn_error) {struct pcpu_tstats *tstats;const struct iphdr *iph =ip_hdr (skb);
@@ -413,7 +413,7 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb, skb->protocol = tpi->proto; skb->mac_header = skb->network_header; -__pskb_pull (skb, tunnel->hlen); +__pskb_pull (skb, hdr_len);skb_postpull_rcsum (skb,skb_transport_header (skb), tunnel->hlen);#ifdef CONFIG_NET_IPGRE_BROADCAST if (ipv4_is_multicast (iph->daddr)) {
net/ipv4/ipip.c +1 -1
@@ -195,7 +195,7 @@ static int ipip_rcv(struct sk_buff *skb)if (tunnel) {if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb)) goto drop; -return ip_tunnel_rcv (tunnel, skb, &tpi, log_ecn_error); +return ip_tunnel_rcv (tunnel, skb, &tpi,0 , log_ecn_error); }return -1 ;
Signature · 1 line
1.7.1
Hi Pravin,
I tested this patch and it works fine with 3.10.17! Now I get correct packets from the GRE-device and can surf again using WCCP.
Thank you very much!
Best regards,
Peter
Quoted 62 lines · Pravin Shelar
Quoted 1 line
Hi Peter,
I think its easy to fix this case, Can you try attached patch? If it works I will send formal patch for stable.
Thanks,
Pravin.Quoted 5 lines · Peter Schmitt
Hi,
Quoted 1 line
On Thursday, October 17, 2013 3:44 PM, Eric Dumazet
Quoted 6 lines · <[email protected]> wrote:
Quoted 6 lines
Quoted 6 lines · Peter Schmitt
Hi,
>
> 3.10 is buggy (forETH_P_WCCPsupport I mean), 3.11 has theprobable
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
> fix :
>
> commit3d7b46cd20e300bd6989fb1f43d46f1b9645816e> ("ip_tunnel: push generic protocol handling toip_tunnelmodule.")
Quoted 6 lines
>
> The problem is 3.10 do not pull the extra 4 bytes of WCCP >
> This is now properly done iniptunnel_pull_header()>Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
First of all, many thanks for your help on this.
I tried to apply the fix to the 3.10.16 sources, as I would like
to
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
stay with the long-term line. Unfortunately it does not apply, as there are a lot of dependencies on other patches.
Do you think there will be a fix for the long-time 3.10 kernel
line?
Quoted 1 line
Quoted 1 line
Quoted 1 line
Or can you guide me on how to apply this fix to the long-term
kernel?
Quoted 2 lines
Quoted 2 lines
3.10 is right in the middle of GRE refactoring, and many bugs are in
it.
Quoted 6 lines
Quoted 2 lines
It might be very painful to get a complete list of patches to backport.
thanks again. Yes I saw that there were lots of changes.
Do you think there will be a fix for all the 3.10.x stable long term kernel
users? Many of them might not be able to use some newer kernel easily or will this be a "won't fix"?
Quoted 4 lines
Best regards,
Peter
Thanks for testing it. I sent patch for stable kernel.
Quoted 75 lines · Peter Schmitt
Hi Pravin,
I tested this patch and it works fine with 3.10.17! Now I get correct packets from the GRE-device and can surf again using WCCP.
Thank you very much!
Best regards,
PeterQuoted 62 lines · Pravin Shelar
Quoted 1 line
Hi Peter,
I think its easy to fix this case, Can you try attached patch? If it works I will send formal patch for stable.
Thanks,
Pravin.Quoted 5 lines · Peter Schmitt
Hi,
Quoted 1 line
On Thursday, October 17, 2013 3:44 PM, Eric Dumazet
Quoted 6 lines · <[email protected]> wrote:
Quoted 6 lines
Quoted 6 lines · Peter Schmitt
Hi,
Quoted 2 lines
3.10 is buggy (for
ETH_P_WCCPsupport I mean), 3.11 has theprobable
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
fix :
commit
3d7b46cd20e300bd6989fb1f43d46f1b9645816e("ip_tunnel: push generic protocol handling toip_tunnelmodule.")
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
The problem is 3.10 do not pull the extra 4 bytes of WCCP
This is now properly done in
iptunnel_pull_header()First of all, many thanks for your help on this.
I tried to apply the fix to the 3.10.16 sources, as I would like
to
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
stay with the long-term line. Unfortunately it does not apply, as there are a lot of dependencies on other patches.
Do you think there will be a fix for the long-time 3.10 kernel
line?
Quoted 1 line
Quoted 1 line
Quoted 1 line
Or can you guide me on how to apply this fix to the long-term
kernel?
Quoted 2 lines
Quoted 2 lines
3.10 is right in the middle of GRE refactoring, and many bugs are in
it.
Quoted 6 lines
Quoted 2 lines
It might be very painful to get a complete list of patches to backport.
thanks again. Yes I saw that there were lots of changes.
Do you think there will be a fix for all the 3.10.x stable long term kernel
users? Many of them might not be able to use some newer kernel easily or will this be a "won't fix"?
Quoted 4 lines
Best regards,
Peter