From: Karl Hiramoto <karl@hiramoto.org>
To: netdev@vger.kernel.org, netfilter@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: problem with IPoA (CLIP), NAT, and VLANS
Date: Mon, 16 Feb 2009 16:02:02 +0100 [thread overview]
Message-ID: <49997FEA.9040300@hiramoto.org> (raw)
In-Reply-To: <49942409.4080506@hiramoto.org>
Karl Hiramoto wrote:
>
> Hi all,
>
> I have a scenario with CLIP IPoA(RFC1577) atm link over ADSL on the
> WAN, 801.1q VLANs on the LAN, and NAT/MASQUERADE that does not work.
>
>
> Network config:
> Nat_host <--> router <---> server
>
> a ping from the Nat_host reaches the server on the WAN fine, and the
> ping comes back to the router, but the ping response never reaches the
> Nat_Host. Using TRACE rules it seems the ICMP ping response gets lost
> inside the router. I see the same behavior with TCP and UDP.
>
>
The problem ended up being the packet being corrupted when the vlan tag
was being added and skb_cow_head() was being called.
Anyone know why skb_cow_head() would corrupt the packet? Perhaps it was
not allocated correctly? I'm using a big-endian ARM IXP435 board.
NET_SKB_PAD change was already discussed:
http://kerneltrap.org/mailarchive/linux-netdev/2009/2/7/4919204
Signed-off by: Karl Hiramoto <karl@hiramoto.org>
--- linux-2.6.28.4.a/include/linux/if_vlan.h 2009-02-06
22:47:45.000000000 +0100
+++ linux-2.6.28.4.b/include/linux/if_vlan.h 2009-02-16
13:55:35.000000000 +0100
@@ -183,9 +183,12 @@ static inline struct sk_buff *__vlan_put
{
struct vlan_ethhdr *veth;
- if (skb_cow_head(skb, VLAN_HLEN) < 0) {
- kfree_skb(skb);
- return NULL;
+ /* If not enough headroom for vlan tag */
+ if (skb_headroom(skb) < VLAN_HLEN) {
+ if (skb_cow_head(skb, VLAN_HLEN) < 0) {
+ kfree_skb(skb);
+ return NULL;
+ }
}
veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN)
--- linux-2.6.28.4.a/include/linux/skbuff.h 2009-02-06
22:47:45.000000000 +0100
+++ linux-2.6.28.4.b/include/linux/skbuff.h 2009-02-16
13:52:54.000000000 +0100
@@ -1263,7 +1263,7 @@ static inline int skb_network_offset(con
* headroom, you should not reduce this.
*/
#ifndef NET_SKB_PAD
-#define NET_SKB_PAD 16
+#define NET_SKB_PAD 32
#endif
next prev parent reply other threads:[~2009-02-16 15:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 13:28 problem with IPoA (CLIP), NAT, and VLANS Karl Hiramoto
2009-02-16 15:02 ` Karl Hiramoto [this message]
2009-02-16 23:20 ` Jarek Poplawski
2009-02-17 9:03 ` Patrick McHardy
2009-02-17 9:32 ` [PATCH] " Jarek Poplawski
2009-02-17 9:39 ` [PATCH v2] " Jarek Poplawski
2009-02-17 11:05 ` Karl Hiramoto
2009-02-17 11:53 ` Jarek Poplawski
2009-02-19 7:31 ` David Miller
2009-02-17 9:52 ` Jarek Poplawski
2009-02-17 11:49 ` Karl Hiramoto
2009-02-17 12:20 ` Jarek Poplawski
2009-02-17 12:53 ` Karl Hiramoto
2009-02-17 13:37 ` Jarek Poplawski
2009-02-17 23:12 ` Jarek Poplawski
2009-02-18 17:47 ` Karl Hiramoto
2009-02-18 21:05 ` Jarek Poplawski
2009-02-19 7:30 ` Jarek Poplawski
2009-02-17 12:28 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49997FEA.9040300@hiramoto.org \
--to=karl@hiramoto.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.