• Andreas Hofmeister's avatar
    ipv6: fix route lookup in addrconf_prefix_rcv() · 14ef37b6
    Andreas Hofmeister authored
    The route lookup to find a previously auto-configured route for a prefixes used
    to use rt6_lookup(), with the prefix from the RA used as an address. However,
    that kind of lookup ignores routing tables, the prefix length and route flags,
    so when there were other matching routes, even in different tables and/or with
    a different prefix length, the wrong route would be manipulated.
    
    Now, a new function "addrconf_get_prefix_route()" is used for the route lookup,
    which searches in RT6_TABLE_PREFIX and takes the prefix-length and route flags
    into account.
    Signed-off-by: default avatarAndreas Hofmeister <andi@collax.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    14ef37b6
addrconf.c 115 KB