| From stable-bounces@linux.kernel.org Thu Jun 22 01:43:03 2006 |
| Date: Thu, 22 Jun 2006 01:42:13 -0700 (PDT) |
| From: David Miller <davem@davemloft.net> |
| To: stable@kernel.org |
| Cc: |
| Subject: IPV6 ADDRCONF: Fix default source address selection without CONFIG_IPV6_PRIVACY |
| |
| From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> |
| |
| 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 | 3 +++ |
| 1 file changed, 3 insertions(+) |
| |
| --- linux-2.6.16.22.orig/net/ipv6/addrconf.c |
| +++ linux-2.6.16.22/net/ipv6/addrconf.c |
| @@ -1065,6 +1065,9 @@ int ipv6_dev_get_saddr(struct net_device |
| 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) { |