]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[NET]: Add missing UFO initialisations
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 8 Nov 2006 06:47:29 +0000 (07:47 +0100)
committerAdrian Bunk <bunk@stusta.de>
Wed, 8 Nov 2006 06:47:29 +0000 (07:47 +0100)
This bug was unknowingly fixed the GSO patches (or rather, its effect was
unknown at the time).

Thanks to Marco Berizzi's persistence which is documented in the thread
"ipsec tunnel asymmetrical mtu", we now know that it can have highly
non-obvious symptoms.

What happens is that uninitialised uso_size fields can cause packets to
be incorrectly identified as UFO, which means that it does not get
fragmented even if it's over the MTU.

The fix is simple enough.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/core/dev.c
net/core/skbuff.c

index 12a214c4e80192c389ac682a474cfe58f0f4a1e3..7405b3ffd33843435faecb3fe423204af47769e7 100644 (file)
@@ -1173,6 +1173,7 @@ int __skb_linearize(struct sk_buff *skb, gfp_t gfp_mask)
        atomic_set(&ninfo->dataref, 1);
        ninfo->tso_size = skb_shinfo(skb)->tso_size;
        ninfo->tso_segs = skb_shinfo(skb)->tso_segs;
+       ninfo->ufo_size = skb_shinfo(skb)->ufo_size;
        ninfo->nr_frags = 0;
        ninfo->frag_list = NULL;
 
index 2144952d1c6cf90d973b51fb25698010d06c7a9e..c0029f93899d9a6b03b362761e8bbd3675a106dc 100644 (file)
@@ -232,6 +232,7 @@ struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
        skb_shinfo(skb)->nr_frags  = 0;
        skb_shinfo(skb)->tso_size = 0;
        skb_shinfo(skb)->tso_segs = 0;
+       skb_shinfo(skb)->ufo_size = 0;
        skb_shinfo(skb)->frag_list = NULL;
 out:
        return skb;
@@ -503,6 +504,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
        atomic_set(&new->users, 1);
        skb_shinfo(new)->tso_size = skb_shinfo(old)->tso_size;
        skb_shinfo(new)->tso_segs = skb_shinfo(old)->tso_segs;
+       skb_shinfo(new)->ufo_size = skb_shinfo(old)->ufo_size;
 }
 
 /**