diff options
author | Michio Honda <micchie@sfc.wide.ad.jp> | 2011-06-16 04:14:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-24 22:41:13 -0400 |
commit | 6af29ccc223b0feb6fc6112281c3fa3cdb1afddf (patch) | |
tree | 53cc047bce9d4c81860f5e852851f94cd1022e0e /net/sctp | |
parent | f207c050fb1c385e34946e57107e639831c7d557 (diff) |
sctp: Bundle HEAERTBEAT into ASCONF_ACK
With this patch a HEARTBEAT chunk is bundled into the ASCONF-ACK
for ADD IP ADDRESS, confirming the new destination as quickly as
possible.
Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/associola.c | 1 | ||||
-rw-r--r-- | net/sctp/sm_make_chunk.c | 1 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index dc16b90ddb6f..152b5b3c3fff 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -282,6 +282,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a | |||
282 | asoc->peer.asconf_capable = 1; | 282 | asoc->peer.asconf_capable = 1; |
283 | asoc->asconf_addr_del_pending = NULL; | 283 | asoc->asconf_addr_del_pending = NULL; |
284 | asoc->src_out_of_asoc_ok = 0; | 284 | asoc->src_out_of_asoc_ok = 0; |
285 | asoc->new_transport = NULL; | ||
285 | 286 | ||
286 | /* Create an input queue. */ | 287 | /* Create an input queue. */ |
287 | sctp_inq_init(&asoc->base.inqueue); | 288 | sctp_inq_init(&asoc->base.inqueue); |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 81db4e385352..0121e0ab0351 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -3015,6 +3015,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc, | |||
3015 | /* Start the heartbeat timer. */ | 3015 | /* Start the heartbeat timer. */ |
3016 | if (!mod_timer(&peer->hb_timer, sctp_transport_timeout(peer))) | 3016 | if (!mod_timer(&peer->hb_timer, sctp_transport_timeout(peer))) |
3017 | sctp_transport_hold(peer); | 3017 | sctp_transport_hold(peer); |
3018 | asoc->new_transport = peer; | ||
3018 | break; | 3019 | break; |
3019 | case SCTP_PARAM_DEL_IP: | 3020 | case SCTP_PARAM_DEL_IP: |
3020 | /* ADDIP 4.3 D7) If a request is received to delete the | 3021 | /* ADDIP 4.3 D7) If a request is received to delete the |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 49b847b00f99..73d14fc02606 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -3612,6 +3612,11 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep, | |||
3612 | */ | 3612 | */ |
3613 | asconf_ack->dest = chunk->source; | 3613 | asconf_ack->dest = chunk->source; |
3614 | sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(asconf_ack)); | 3614 | sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(asconf_ack)); |
3615 | if (asoc->new_transport) { | ||
3616 | sctp_sf_heartbeat(ep, asoc, type, asoc->new_transport, | ||
3617 | commands); | ||
3618 | ((struct sctp_association *)asoc)->new_transport = NULL; | ||
3619 | } | ||
3615 | 3620 | ||
3616 | return SCTP_DISPOSITION_CONSUME; | 3621 | return SCTP_DISPOSITION_CONSUME; |
3617 | } | 3622 | } |