diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2005-12-21 08:58:01 -0500 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2005-12-21 08:58:01 -0500 |
commit | 6b3ae80a63e47f6e97d68a1ddd520e3509e62821 (patch) | |
tree | 8f4f40abffc2702c8b05323c93b5f122360ea412 /net/ipv6/addrconf.c | |
parent | c5e33bddd3c798f681f8f3027270127be6b61a3b (diff) |
[IPV6]: Don't select a tentative address as a source address.
A tentative address is not considered "assigned to an interface"
in the traditional sense (RFC2462 Section 4).
Don't try to select such an address for the source address.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index f6ead6a843e3..fd03c3944366 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -908,11 +908,18 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev, | |||
908 | 908 | ||
909 | score.addr_type = __ipv6_addr_type(&ifa->addr); | 909 | score.addr_type = __ipv6_addr_type(&ifa->addr); |
910 | 910 | ||
911 | /* Rule 0: Candidate Source Address (section 4) | 911 | /* Rule 0: |
912 | * - Tentative Address (RFC2462 section 5.4) | ||
913 | * - A tentative address is not considered | ||
914 | * "assigned to an interface" in the traditional | ||
915 | * sense. | ||
916 | * - Candidate Source Address (section 4) | ||
912 | * - In any case, anycast addresses, multicast | 917 | * - In any case, anycast addresses, multicast |
913 | * addresses, and the unspecified address MUST | 918 | * addresses, and the unspecified address MUST |
914 | * NOT be included in a candidate set. | 919 | * NOT be included in a candidate set. |
915 | */ | 920 | */ |
921 | if (ifa->flags & IFA_F_TENTATIVE) | ||
922 | continue; | ||
916 | if (unlikely(score.addr_type == IPV6_ADDR_ANY || | 923 | if (unlikely(score.addr_type == IPV6_ADDR_ANY || |
917 | score.addr_type & IPV6_ADDR_MULTICAST)) { | 924 | score.addr_type & IPV6_ADDR_MULTICAST)) { |
918 | LIMIT_NETDEBUG(KERN_DEBUG | 925 | LIMIT_NETDEBUG(KERN_DEBUG |