Skip to content

Commit

Permalink
ipv6: fix the noflags test in addrconf_get_prefix_route
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Romain Kuntz authored and David S. Miller committed Jan 10, 2013
1 parent f26845b commit 85da53b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 85da53b

Please sign in to comment.