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

Commit c17b02b3 authored by Vlad Yasevich's avatar Vlad Yasevich
Browse files

sctp: send SHUTDOWN-ACK chunk back to the source.



SHUTDOWN-ACK is alaways sent to the primary path at the first time,
but should better transmit SHUTDOWN-ACK chunk to the same destination
transport address from which it received the SHUTDOWN chunk.
Based on the work from Wei Yongjun <yjwei@cn.fujitsu.com>.

Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
parent a5f4cea7
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -697,11 +697,15 @@ static void sctp_cmd_setup_t2(sctp_cmd_seq_t *cmds,
{
	struct sctp_transport *t;

	if (chunk->transport)
		t = chunk->transport;
	else {
		t = sctp_assoc_choose_alter_transport(asoc,
					      asoc->shutdown_last_sent_to);
		chunk->transport = t;
	}
	asoc->shutdown_last_sent_to = t;
	asoc->timeouts[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN] = t->rto;
	chunk->transport = t;
}

/* Helper function to change the state of an association. */