aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-07-13 19:11:01 +1000
committerGreg Kroah-Hartman <gregkh@suse.de>2006-07-24 20:35:25 -0700
commitcefc30b36a16abd1284425aff1aaf0cc2b51b047 (patch)
tree66b0e7695a745aa4e9d52f2430a3bd7d321fb9af
parent949837a9ea1aba1c9ca19bf1969cd72c7de72d75 (diff)
Add missing UFO initialisations
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: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--net/core/dev.c1
-rw-r--r--net/core/skbuff.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 4fba549caf2..7d472edd86e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1246,6 +1246,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;
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index fb3770f9c09..0280535bdd5 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -240,6 +240,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;
@@ -529,6 +530,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;
}
/**