Re: [PATCH] IPV6: Fixed M-Flag in last fragment
From: YOSHIFUJI Hideaki / 吉藤英明 <hidden>
Date: 2003-06-28 10:12:12
In article [ref] (at Sat, 28 Jun 2003 19:10:13 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 [off-list ref] says:
Hello. M-Flag was set on last fragment.
Oops, here's the patch. 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.30 diff -u -r1.30 ip6_output.c
--- linux-2.5/net/ipv6/ip6_output.c 24 Jun 2003 21:56:18 -0000 1.30
+++ linux-2.5/net/ipv6/ip6_output.c 28 Jun 2003 08:52:47 -0000@@ -1004,9 +1004,7 @@ offset += skb->len - hlen - sizeof(struct frag_hdr); fh->nexthdr = nexthdr; fh->reserved = 0; - if (frag->next != NULL) - offset |= 0x0001; - fh->frag_off = htons(offset); + fh->frag_off = htons(offset | (frag->next != NULL ? 0x0001 : 0)); fh->identification = frag_id; frag->nh.ipv6h->payload_len = htons(frag->len - sizeof(struct ipv6hdr)); ip6_copy_metadata(frag, skb);
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA