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

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
...@@ -1877,7 +1877,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx, ...@@ -1877,7 +1877,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx,
continue; continue;
if ((rt->rt6i_flags & flags) != flags) if ((rt->rt6i_flags & flags) != flags)
continue; continue;
if ((noflags != 0) && ((rt->rt6i_flags & flags) != 0)) if ((rt->rt6i_flags & noflags) != 0)
continue; continue;
dst_hold(&rt->dst); dst_hold(&rt->dst);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment