• Pedro Ribeiro's avatar
    IPV6: Fix default gateway criteria wrt. HIGH/LOW preference radv option · 22441cfa
    Pedro Ribeiro authored
    Problem observed:
                   In IPv6, in the presence of multiple routers candidates to
                   default gateway in one segment, each sending a different
                   value of preference, the Linux hosts connected to the
                   segment weren't selecting the right one in all the
                   combinations possible of LOW/MEDIUM/HIGH preference.
    This patch changes two files:
                   Get the "router_pref" bitfield in the right place
                   (as RFC4191 says), named the bit left with this fix as
                   "home_agent" (RFC3775 say that's his function)
                   Corrects the binary logic behind the updating of the
                   router preference in the flags of the routing table
                   With this two fixes applied, the default route used by
                   the system was to consistent with the rules mentioned
                   in RFC4191 in case of changes in the value of preference
                   in router advertisements
    Signed-off-by: default avatarPedro Ribeiro <pribeiro@net.ipl.pt>
    Acked-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
icmpv6.h 4.54 KB