ipv6: fix the noflags test in addrconf_get_prefix_route

The tests on the flags in addrconf_get_prefix_route() does no make
much sense: the 'noflags' parameter contains the set of flags that
must not match with the route flags, so the test must be done
against 'noflags', and not against 'flags'.

Signed-off-by: Romain Kuntz <r.kuntz@ipflavors.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Romain Kuntz 2013-01-09 15:02:26 +01:00 committed by David S. Miller
parent f26845b43c
commit 85da53bf1c
1 changed files with 1 additions and 1 deletions

View File

@ -1877,7 +1877,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx,
continue;
if ((rt->rt6i_flags & flags) != flags)
continue;
if ((noflags != 0) && ((rt->rt6i_flags & flags) != 0))
if ((rt->rt6i_flags & noflags) != 0)
continue;
dst_hold(&rt->dst);
break;