Skip to content

Commit 6af29cc

Browse files
micchiedavem330
authored andcommitted
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>
1 parent f207c05 commit 6af29cc

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

include/net/sctp/structs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,7 @@ struct sctp_association {
19151915
__u32 addip_serial;
19161916
union sctp_addr *asconf_addr_del_pending;
19171917
int src_out_of_asoc_ok;
1918+
struct sctp_transport *new_transport;
19181919

19191920
/* SCTP AUTH: list of the endpoint shared keys. These
19201921
* keys are provided out of band by the user applicaton

net/sctp/associola.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
282282
asoc->peer.asconf_capable = 1;
283283
asoc->asconf_addr_del_pending = NULL;
284284
asoc->src_out_of_asoc_ok = 0;
285+
asoc->new_transport = NULL;
285286

286287
/* Create an input queue. */
287288
sctp_inq_init(&asoc->base.inqueue);

net/sctp/sm_make_chunk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,6 +3015,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
30153015
/* Start the heartbeat timer. */
30163016
if (!mod_timer(&peer->hb_timer, sctp_transport_timeout(peer)))
30173017
sctp_transport_hold(peer);
3018+
asoc->new_transport = peer;
30183019
break;
30193020
case SCTP_PARAM_DEL_IP:
30203021
/* ADDIP 4.3 D7) If a request is received to delete the

net/sctp/sm_statefuns.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3612,6 +3612,11 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
36123612
*/
36133613
asconf_ack->dest = chunk->source;
36143614
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+
}
36153620

36163621
return SCTP_DISPOSITION_CONSUME;
36173622
}

0 commit comments

Comments
 (0)