]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit379e071b70cb906ccd7f30945f1a18f9abb231aa
tree800422d2aa85e190bc6e07e305574d71bf25db24
parent1ac230782d3ec8c9ab4d3e365be97e16f5eda166
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