diff options
author | Michio Honda <micchie@sfc.wide.ad.jp> | 2011-04-26 07:19:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-02 05:04:53 -0400 |
commit | 8a07eb0a50aebc8c95478d49c28c7f8419a26cef (patch) | |
tree | a98ab91189d1dd0781d7768c0b0d395c1919d571 /net/sctp/associola.c | |
parent | 7dc04d712203eecdc1435a4cd135935c4a297be5 (diff) |
sctp: Add ASCONF operation on the single-homed host
In this case, the SCTP association transmits an ASCONF packet
including addition of the new IP address and deletion of the old
address. This patch implements this functionality.
In this case, the ASCONF chunk is added to the beginning of the
queue, because the other chunks cannot be transmitted in this state.
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/associola.c')
-rw-r--r-- | net/sctp/associola.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 4a62888f2e43..dc16b90ddb6f 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -280,6 +280,8 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a | |||
280 | asoc->peer.asconf_capable = 0; | 280 | asoc->peer.asconf_capable = 0; |
281 | if (sctp_addip_noauth) | 281 | if (sctp_addip_noauth) |
282 | asoc->peer.asconf_capable = 1; | 282 | asoc->peer.asconf_capable = 1; |
283 | asoc->asconf_addr_del_pending = NULL; | ||
284 | asoc->src_out_of_asoc_ok = 0; | ||
283 | 285 | ||
284 | /* Create an input queue. */ | 286 | /* Create an input queue. */ |
285 | sctp_inq_init(&asoc->base.inqueue); | 287 | sctp_inq_init(&asoc->base.inqueue); |
@@ -446,6 +448,10 @@ void sctp_association_free(struct sctp_association *asoc) | |||
446 | 448 | ||
447 | sctp_asconf_queue_teardown(asoc); | 449 | sctp_asconf_queue_teardown(asoc); |
448 | 450 | ||
451 | /* Free pending address space being deleted */ | ||
452 | if (asoc->asconf_addr_del_pending != NULL) | ||
453 | kfree(asoc->asconf_addr_del_pending); | ||
454 | |||
449 | /* AUTH - Free the endpoint shared keys */ | 455 | /* AUTH - Free the endpoint shared keys */ |
450 | sctp_auth_destroy_keys(&asoc->endpoint_shared_keys); | 456 | sctp_auth_destroy_keys(&asoc->endpoint_shared_keys); |
451 | 457 | ||