Commit 85da53bf authored by Romain Kuntz's avatar Romain Kuntz Committed by David S. Miller
Browse files

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: default avatarRomain Kuntz <r.kuntz@ipflavors.com>
Acked-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f26845b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;