]> git.hungrycats.org Git - linux/commitdiff
[IPV6] Don't set M flag in last fragment.
authorHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Mon, 30 Jun 2003 06:37:48 +0000 (16:37 +1000)
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Mon, 30 Jun 2003 06:37:48 +0000 (16:37 +1000)
net/ipv6/ip6_output.c

index c88f04ce05693040000e9cefeca8073a7f6e1de8..5ab5fa319a0520ad5978c7217e4a90c88428c0da 100644 (file)
@@ -1004,9 +1004,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*))
                                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);