[for,2.6.27] Structure icmp6hdr (IPv6/ICMPv6) with bug in the bitfields!

Submitted by Pedro Ribeiro on Oct. 14, 2008, 10:38 p.m.

Details

Message ID 1338007712.20081014233811@net.ipl.pt
State Changes Requested
Headers show

Commit Message

Pedro Ribeiro Oct. 14, 2008, 10:38 p.m.
Hello David,

Thanks for your time on this, follows a new patch made against 2.6.27,
this time I minimized the cut&paste to avoid corrupting the patch.




Best regards.

Tuesday, October 14, 2008, 9:54:23 PM, you wrote:

> From: Pedro Ribeiro <pribeiro-bulk@net.ipl.pt>
> Date: Tue, 14 Oct 2008 12:06:20 +0100

>> Follows a “diff” with the changes I’ve made to correct this problem
>> (I’ve made it against kernel 2.6.23, but I’ve confirmed that the
>> problem still exists in 2.6.25)

> Please make your patch against current sources, it does not apply
> to the current tree.
> ??칻?&????a??e??Aǧta|b??A?{.n?+?????]z?A?{a|?w0h|???,j???fj:+v?????w???2??f???h??b??Aj?A??i????????zPh??j:+v??)ߤm?

Comments

David Miller Oct. 14, 2008, 10:47 p.m.
From: Pedro Ribeiro <pribeiro-bulk@net.ipl.pt>
Date: Tue, 14 Oct 2008 23:38:11 +0100

> Hello David,
> 
> Thanks for your time on this, follows a new patch made against 2.6.27,
> this time I minimized the cut&paste to avoid corrupting the patch.

It's still corrupted, the tab characters in the patch were
transformed into spaces.

It's not about cut&paste, your email client is reformatting the
content (no matter how you compose it) before sending it out.

You need to configure your email client explicitly to not reformat the
content and to use plain ASCII text.

Also, you need to provide a proper "Signed-off-by: " line.

All of this is detailed in the following kernel source doc
files:

linux/Documentation/email-clients.txt
linux/Documentation/SubmittingPatches 

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

diff -wurNbB linux-2.6.27/include/linux/icmpv6.h linux-2.6.27fix/include/linux/icmpv6.h
--- linux-2.6.27/include/linux/icmpv6.h 2008-10-09 23:13:53.000000000 +0100
+++ linux-2.6.27fix/include/linux/icmpv6.h      2008-10-14 23:24:31.000000000 +0100
@@ -40,16 +40,18 @@ 
                 struct icmpv6_nd_ra {
                        __u8            hop_limit;
 #if defined(__LITTLE_ENDIAN_BITFIELD)
-                       __u8            reserved:4,
+                       __u8            reserved:3,
                                        router_pref:2,
+                                       home_agent:1,
                                        other:1,
                                        managed:1;
 
 #elif defined(__BIG_ENDIAN_BITFIELD)
                        __u8            managed:1,
                                        other:1,
+                                       home_agent:1,
                                        router_pref:2,
-                                       reserved:4;
+                                       reserved:3;
 #else
 #error "Please fix <asm/byteorder.h>"
 #endif
diff -wurNbB linux-2.6.27/net/ipv6/ndisc.c linux-2.6.27fix/net/ipv6/ndisc.c
--- linux-2.6.27/net/ipv6/ndisc.c       2008-10-09 23:13:53.000000000 +0100
+++ linux-2.6.27fix/net/ipv6/ndisc.c    2008-10-14 23:24:31.000000000 +0100
@@ -1199,7 +1199,7 @@ 
                }
                neigh->flags |= NTF_ROUTER;
        } else if (rt) {
-               rt->rt6i_flags |= (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref);
+               rt->rt6i_flags = (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref);
        }
 
        if (rt)