]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: use addrconf_get_prefix_route for prefix route lookup [v2]
authorRomain Kuntz <r.kuntz@ipflavors.com>
Wed, 9 Jan 2013 21:06:03 +0000 (21:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jan 2013 22:22:54 +0000 (14:22 -0800)
commit2c3d9d314e2dbc1cffd77010df849c623da65ceb
tree49ca3e7514dfbb43777b278eeb8d8ccde5572572
parent7fd2959dd14d040a6fb84b5b59fff131d4f8a8f7
ipv6: use addrconf_get_prefix_route for prefix route lookup [v2]

Replace ip6_route_lookup() with addrconf_get_prefix_route() when
looking up for a prefix route. This ensures that the connected prefix
is looked up in the main table, and avoids the selection of other
matching routes located in different tables as well as blackhole
or prohibited entries.

In addition, this fixes an Opps introduced by commit 69feb141 (ipv6:
del unreachable route when an addr is deleted on lo), that would occur
when a blackhole or prohibited entry is selected by ip6_route_lookup().
Such entries have a NULL rt6i_table argument, which is accessed by
__ip6_del_rt() when trying to lock rt6i_table->tb6_lock.

The function addrconf_is_prefix_route() is not used anymore and is
removed.

[v2] Minor indentation cleanup and log updates.

Signed-off-by: Romain Kuntz <r.kuntz@ipflavors.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c