IPV6: Fixed fragment check in ip6_output.c:ip6_fragment()

Started by YOSHIFUJI Hideaki / 吉藤英明 on Jun 26, 2003 · 2 messages from 2 authors · Last reply Jun 27, 2003

STALE8530d

open the first message on its own page

  1. [PATCH] IPV6: Fixed fragment check in ip6_output.c:ip6_fragment()
    Related patches
Hello.

MTU / alignment check in ip6_fragment() was wrong;
first_len was not correct.

Thanks.

Index: linux-2.5/net/ipv6/ip6_output.c
===================================================================
RCS file: /home/cvs/linux-2.5/net/ipv6/ip6_output.c,v
retrieving revision 1.29
diff -u -p -r1.29 ip6_output.c
--- linux-2.5/net/ipv6/ip6_output.c	21 Jun 2003 16:20:41 -0000	1.29
+++ linux-2.5/net/ipv6/ip6_output.c	26 Jun 2003 10:28:17 -0000
@@ -939,7 +939,7 @@ static int ip6_fragment(struct sk_buff *
 	mtu = dst_pmtu(&rt->u.dst) - hlen - sizeof(struct frag_hdr);
 
 	if (skb_shinfo(skb)->frag_list) {
-		int first_len = 0;
+		int first_len = skb_pagelen(skb);
 
 		if (first_len - hlen > mtu ||
 		    ((first_len - hlen) & 7) ||

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
On Thu, 26 Jun 2003, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote:
Hello.

MTU / alignment check in ip6_fragment() was wrong;
first_len was not correct.
Applied to bk://kernel.bkbits.net/jmorris/net-2.5


- James
-- 
James Morris
[off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help