From: Romain Kuntz Date: Wed, 9 Jan 2013 14:02:26 +0000 (+0100) Subject: ipv6: fix the noflags test in addrconf_get_prefix_route X-Git-Tag: v3.8-rc4~29^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85da53bf1c336bb07ac038fb951403ab0478d2c5;p=profile%2Fcommon%2Fkernel-common.git 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 Acked-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 408cac4a..29ba4ff1 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -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;