Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6af29ccc authored by Michio Honda's avatar Michio Honda Committed by David S. Miller
Browse files

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: default avatarMichio Honda <micchie@sfc.wide.ad.jp>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f207c050
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1915,6 +1915,7 @@ struct sctp_association {
	__u32 addip_serial;
	__u32 addip_serial;
	union sctp_addr *asconf_addr_del_pending;
	union sctp_addr *asconf_addr_del_pending;
	int src_out_of_asoc_ok;
	int src_out_of_asoc_ok;
	struct sctp_transport *new_transport;


	/* SCTP AUTH: list of the endpoint shared keys.  These
	/* SCTP AUTH: list of the endpoint shared keys.  These
	 * keys are provided out of band by the user applicaton
	 * keys are provided out of band by the user applicaton
+1 −0
Original line number Original line Diff line number Diff line
@@ -282,6 +282,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
		asoc->peer.asconf_capable = 1;
		asoc->peer.asconf_capable = 1;
	asoc->asconf_addr_del_pending = NULL;
	asoc->asconf_addr_del_pending = NULL;
	asoc->src_out_of_asoc_ok = 0;
	asoc->src_out_of_asoc_ok = 0;
	asoc->new_transport = NULL;


	/* Create an input queue.  */
	/* Create an input queue.  */
	sctp_inq_init(&asoc->base.inqueue);
	sctp_inq_init(&asoc->base.inqueue);
+1 −0
Original line number Original line Diff line number Diff line
@@ -3015,6 +3015,7 @@ static __be16 sctp_process_asconf_param(struct sctp_association *asoc,
		/* Start the heartbeat timer. */
		/* Start the heartbeat timer. */
		if (!mod_timer(&peer->hb_timer, sctp_transport_timeout(peer)))
		if (!mod_timer(&peer->hb_timer, sctp_transport_timeout(peer)))
			sctp_transport_hold(peer);
			sctp_transport_hold(peer);
		asoc->new_transport = peer;
		break;
		break;
	case SCTP_PARAM_DEL_IP:
	case SCTP_PARAM_DEL_IP:
		/* ADDIP 4.3 D7) If a request is received to delete the
		/* ADDIP 4.3 D7) If a request is received to delete the
+5 −0
Original line number Original line Diff line number Diff line
@@ -3612,6 +3612,11 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
	 */
	 */
	asconf_ack->dest = chunk->source;
	asconf_ack->dest = chunk->source;
	sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(asconf_ack));
	sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(asconf_ack));
	if (asoc->new_transport) {
	        sctp_sf_heartbeat(ep, asoc, type, asoc->new_transport,
                    commands);
		((struct sctp_association *)asoc)->new_transport = NULL;
	}


	return SCTP_DISPOSITION_CONSUME;
	return SCTP_DISPOSITION_CONSUME;
}
}