ipv6: honor ifindex in case we receive ll addresses in router advertisements
Marc Haber reported we don't honor interface indexes when we receive link local router addresses in router advertisements. Luckily the non-strict version of ipv6_chk_addr already does the correct job here, so we can simply use it to lighten the checks and use those addresses by default without any configuration change. Link: <http://permalink.gmane.org/gmane.linux.network/391348> Reported-by: Marc Haber <mh+netdev@zugschlus.de> Cc: Marc Haber <mh+netdev@zugschlus.de> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5449a5ca9b
commit
c1a9a291ce
1 changed files with 2 additions and 2 deletions
|
@ -1183,7 +1183,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
|
|||
*/
|
||||
if (!in6_dev->cnf.accept_ra_from_local &&
|
||||
ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr,
|
||||
NULL, 0)) {
|
||||
in6_dev->dev, 0)) {
|
||||
ND_PRINTK(2, info,
|
||||
"RA from local address detected on dev: %s: default router ignored\n",
|
||||
skb->dev->name);
|
||||
|
@ -1337,7 +1337,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
|
|||
#ifdef CONFIG_IPV6_ROUTE_INFO
|
||||
if (!in6_dev->cnf.accept_ra_from_local &&
|
||||
ipv6_chk_addr(dev_net(in6_dev->dev), &ipv6_hdr(skb)->saddr,
|
||||
NULL, 0)) {
|
||||
in6_dev->dev, 0)) {
|
||||
ND_PRINTK(2, info,
|
||||
"RA from local address detected on dev: %s: router info ignored.\n",
|
||||
skb->dev->name);
|
||||
|
|
Loading…
Reference in a new issue