Commit 3b69055b authored by Romain Kuntz's avatar Romain Kuntz Committed by Greg Kroah-Hartman

ipv6: fix the noflags test in addrconf_get_prefix_route

[ Upstream commit 85da53bf ]

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0ad71575
...@@ -1736,7 +1736,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx, ...@@ -1736,7 +1736,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