From: YOSHIFUJI Hideaki Date: Thu, 22 Jun 2006 08:42:13 +0000 (-0700) Subject: [PATCH] IPV6 ADDRCONF: Fix default source address selection without CONFIG_IPV6_PRIVACY X-Git-Tag: v2.6.17.2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e778d0ec93ec97fb851b8e0bd5e1488f083baa6a;p=thirdparty%2Fkernel%2Fstable.git [PATCH] IPV6 ADDRCONF: Fix default source address selection without CONFIG_IPV6_PRIVACY We need to update hiscore.rule even if we don't enable CONFIG_IPV6_PRIVACY, because we have more less significant rule; longest match. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller Signed-off-by: Chris Wright --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 6b361fc3e14d5..4da664538f520 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1075,6 +1075,9 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev, if (hiscore.attrs & IPV6_SADDR_SCORE_PRIVACY) continue; } +#else + if (hiscore.rule < 7) + hiscore.rule++; #endif /* Rule 8: Use longest matching prefix */ if (hiscore.rule < 8) {