diff options
author | Michio Honda <micchie@sfc.wide.ad.jp> | 2011-04-26 19:32:51 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-02 02:04:53 -0700 |
commit | 9f7d653b67aed2d92540fbb0a8adaf32fcf352ae (patch) | |
tree | 1e128f1465135dd70f202b8720c32cbfd536cb68 /net/sctp/bind_addr.c | |
parent | 3ced2dddf10f26f0aaff96f3345a3d876cea62f8 (diff) |
sctp: Add Auto-ASCONF support (core).
SCTP reconfigure the IP addresses in the association by using
ASCONF chunks as mentioned in RFC5061. For example, we can
start to use the newly configured IP address in the existing
association. This patch implements automatic ASCONF operation
in the SCTP stack with address events in the host computer,
which is called auto_asconf.
Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/bind_addr.c')
-rw-r--r-- | net/sctp/bind_addr.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 83e3011c19c..17d157325b6 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c @@ -534,6 +534,21 @@ int sctp_in_scope(const union sctp_addr *addr, sctp_scope_t scope) return 0; } +int sctp_is_ep_boundall(struct sock *sk) +{ + struct sctp_bind_addr *bp; + struct sctp_sockaddr_entry *addr; + + bp = &sctp_sk(sk)->ep->base.bind_addr; + if (sctp_list_single_entry(&bp->address_list)) { + addr = list_entry(bp->address_list.next, + struct sctp_sockaddr_entry, list); + if (sctp_is_any(sk, &addr->a)) + return 1; + } + return 0; +} + /******************************************************************** * 3rd Level Abstractions ********************************************************************/ |