diff options
author | Sridhar Samudrala <sri@us.ibm.com> | 2006-07-21 17:49:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-21 17:49:25 -0400 |
commit | dc022a9874d026c7d1635ae66d1afafc5f053731 (patch) | |
tree | 3a1feddee57eabd788311e2433e922b59036e903 /net/sctp/ipv6.c | |
parent | 9faa730f1cbb951e95cb18e71b0fe265014c2450 (diff) |
[SCTP]: ADDIP: Don't use an address as source until it is ASCONF-ACKed
This implements Rules D1 and D4 of Sec 4.3 in the ADDIP draft.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ipv6.c')
-rw-r--r-- | net/sctp/ipv6.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 8ef08070c8b6..99c0cefc04e0 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -290,7 +290,8 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc, | |||
290 | sctp_read_lock(addr_lock); | 290 | sctp_read_lock(addr_lock); |
291 | list_for_each(pos, &bp->address_list) { | 291 | list_for_each(pos, &bp->address_list) { |
292 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); | 292 | laddr = list_entry(pos, struct sctp_sockaddr_entry, list); |
293 | if ((laddr->a.sa.sa_family == AF_INET6) && | 293 | if ((laddr->use_as_src) && |
294 | (laddr->a.sa.sa_family == AF_INET6) && | ||
294 | (scope <= sctp_scope(&laddr->a))) { | 295 | (scope <= sctp_scope(&laddr->a))) { |
295 | bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a); | 296 | bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a); |
296 | if (!baddr || (matchlen < bmatchlen)) { | 297 | if (!baddr || (matchlen < bmatchlen)) { |