FIXED: IPv6 Route selection now correct with multiple gateways and preferences

Submitted by Pedro Ribeiro on Oct. 14, 2008, 8:07 p.m.

Details

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

Commit Message

Pedro Ribeiro Oct. 14, 2008, 8:07 p.m.
Hello Arnaud and all,

I’ve found the other part of the problem.
ndisc_router_discovery () at ndisc.c weren’t correctly updating the
flags in the route table, the problem is now fixed with the correct
default router being updated as soon as the next RA with the new
preference is received.

Follows the two patches made against 2.6.23 (this one and the first
I’ve sent) but I’ve seen in 2.6.26 the problem also exists and the fix
should apply without problems.

Can any of the maintainers give-me some expectations of when (and if) this fix
will be added to a kernel release?

Should I patch all of our ~60 Linux machines or wait for a general
upgrade with a new kernel soon?

Thanks for all the support in this subject.

Best regards.

#######################################################################

Comments

David Miller Oct. 14, 2008, 8:15 p.m.
From: Pedro Ribeiro <pribeiro-bulk@net.ipl.pt>
Date: Tue, 14 Oct 2008 21:07:32 +0100

> Can any of the maintainers give-me some expectations of when (and
> if) this fix will be added to a kernel release?

Well, first of all, your email client corrupted the patch (turning
tab characters into spaces etc.) so that is the first thing you
need to fix before we'll even look at this.
--
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

--- linux-2.6.23-gentoo-r9orig/net/ipv6/ndisc.c    2007-10-09 21:31:38.000000000 +0100
+++ linux-2.6.23-gentoo-r9/net/ipv6/ndisc.c    2008-10-14 20:07:48.000000000 +0100
@@ -1101,7 +1101,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)

(this part is a "repost" just to keep both patches together)

--- linux-2.6.23-gentoo-r9orig/include/linux/icmpv6.h      2007-10-09 21:31:38.000000000 +0100
+++ linux-2.6.23-gentoo-r9/include/linux/icmpv6.h      2008-10-13 17:42:56.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>"