diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-12-13 17:18:22 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-12-13 17:18:22 -0500 |
commit | 88b45eda48a5fccc466fdc69cebb0238ad3ae690 (patch) | |
tree | 78a3900f8149bc05bfa11ae4d603e38a31ead1f9 | |
parent | 4b076544218227e9fa0a09a2adbb4bdab85a1089 (diff) | |
download | longterm-queue-2.6.34-88b45eda48a5fccc466fdc69cebb0238ad3ae690.tar.gz |
add IPv6 UDP headroom patch
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/ipv6-udp-fix-the-wrong-headroom-check.patch | 38 | ||||
-rw-r--r-- | queue/series | 3 |
2 files changed, 41 insertions, 0 deletions
diff --git a/queue/ipv6-udp-fix-the-wrong-headroom-check.patch b/queue/ipv6-udp-fix-the-wrong-headroom-check.patch new file mode 100644 index 0000000..d23fa3c --- /dev/null +++ b/queue/ipv6-udp-fix-the-wrong-headroom-check.patch @@ -0,0 +1,38 @@ +From f7cd75a25ce71fc1012d1ff31c23c292b2f36028 Mon Sep 17 00:00:00 2001 +From: Shan Wei <shanwei@cn.fujitsu.com> +Date: Tue, 19 Apr 2011 22:52:49 +0000 +Subject: [PATCH] ipv6: udp: fix the wrong headroom check + +commit a9cf73ea7ff78f52662c8658d93c226effbbedde upstream. + +At this point, skb->data points to skb_transport_header. +So, headroom check is wrong. + +For some case:bridge(UFO is on) + eth device(UFO is off), +there is no enough headroom for IPv6 frag head. +But headroom check is always false. + +This will bring about data be moved to there prior to skb->head, +when adding IPv6 frag header to skb. + +Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> +Acked-by: Herbert Xu <herbert@gondor.apana.org.au> +Signed-off-by: David S. Miller <davem@davemloft.net> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> + +diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c +index be5e5a1..402a61c 100644 +--- a/net/ipv6/udp.c ++++ b/net/ipv6/udp.c +@@ -1314,7 +1314,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, int features) + skb->ip_summed = CHECKSUM_NONE; + + /* Check if there is enough headroom to insert fragment header. */ +- if ((skb_headroom(skb) < frag_hdr_sz) && ++ if ((skb_mac_header(skb) < skb->head + frag_hdr_sz) && + pskb_expand_head(skb, frag_hdr_sz, 0, GFP_ATOMIC)) + goto out; + +-- +1.7.7 + diff --git a/queue/series b/queue/series index b33f3af..af3d459 100644 --- a/queue/series +++ b/queue/series @@ -209,6 +209,9 @@ inet_diag-fix-inet_diag_bc_audit.patch # Content taken from v2.6.32.44 gro-Only-reset-frag0-when-skb-can-be-pulled.patch +# Content taken from v2.6.38.8 +ipv6-udp-fix-the-wrong-headroom-check.patch + # Content taken from v3.0.9 rtnetlink-Add-missing-manual-netlink-notification-in.patch |