]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] IPV6 ADDRCONF: Fix default source address selection without CONFIG_IPV6_PRIVACY
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Thu, 22 Jun 2006 08:42:13 +0000 (01:42 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 17 Jul 2006 13:54:20 +0000 (06:54 -0700)
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 <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv6/addrconf.c

index 4df2c7abca1effcf0e08f5d99df32e5147093fbf..99e960c445d429b245cf3aebd96bf0082c654392 100644 (file)
@@ -1065,6 +1065,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) {