ipv6: fix route lookup in addrconf_prefix_rcv()
authorAndreas Hofmeister <andi@collax.com>
Wed, 26 Oct 2011 03:24:29 +0000 (03:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Oct 2011 08:12:36 +0000 (04:12 -0400)
commit14ef37b6d00eb5d06704e45989ba4c21e7be7673
tree800422d2aa85e190bc6e07e305574d71bf25db24
parente6d265e8504ab4a3368b8645d318b344ee88b280
ipv6: fix route lookup in addrconf_prefix_rcv()

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: Andreas Hofmeister <andi@collax.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c