netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: fix incorrent ipv6 ipsec packet fragment
@ 2012-03-16  8:57 Gao feng
  2012-03-17  4:58 ` David Miller
  2012-03-19  8:02 ` Steffen Klassert
  0 siblings, 2 replies; 10+ messages in thread
From: Gao feng @ 2012-03-16  8:57 UTC (permalink / raw)
  To: davem; +Cc: steffen.klassert, eric.dumazet, netdev, Gao feng

Since commit 299b0767(ipv6: Fix IPsec slowpath fragmentation problem)
In func ip6_append_data,after call skb_put(skb, fraglen + dst_exthdrlen)
the skb->len contains dst_exthdrlen,and we don't reduce dst_exthdrlen at last
This will make fraggap>0 in next "while cycle",and cause the size of skb incorrent

Call skb_pull reduce skb->len before next "while cycle"

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
 net/ipv6/ip6_output.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index d97e071..f67f840 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1450,7 +1450,8 @@ alloc_new_skb:
 				kfree_skb(skb);
 				goto error;
 			}
-
+
+			skb_pull(skb, dst_exthdrlen);
 			offset += copy;
 			length -= datalen - fraggap;
 			transhdrlen = 0;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-20  9:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16  8:57 [PATCH] ipv6: fix incorrent ipv6 ipsec packet fragment Gao feng
2012-03-17  4:58 ` David Miller
2012-03-19  8:02 ` Steffen Klassert
2012-03-19 21:21   ` David Miller
2012-03-20  1:09   ` Gao feng
2012-03-20  3:22   ` [PATCH v2] " Gao feng
2012-03-20  7:58     ` Steffen Klassert
2012-03-20  8:36       ` [PATCH v3] " Gao feng
2012-03-20  8:54         ` Steffen Klassert
2012-03-20  9:40           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).