From 7d6cef2e57b743df3ac5076c44865bdca74437c6 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sun, 26 Apr 2009 23:13:35 +0800 Subject: [PATCH] --- yaml --- r: 150625 b: refs/heads/master c: 6345b19985e9f3ec31b61720de01806e3ef680fe h: refs/heads/master i: 150623: e0f030801a006a5bf88a9284450c0b161ec33f5b v: v3 --- [refs] | 2 +- trunk/net/sctp/associola.c | 8 ++++++++ trunk/net/sctp/sm_statefuns.c | 10 +++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 40167a61e8c5..24ad1ee0da1c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a2c395846cf6abfdda3c04a19a0982adbb6469c2 +refs/heads/master: 6345b19985e9f3ec31b61720de01806e3ef680fe diff --git a/trunk/net/sctp/associola.c b/trunk/net/sctp/associola.c index e7b69a7360e2..3be28fed5915 100644 --- a/trunk/net/sctp/associola.c +++ b/trunk/net/sctp/associola.c @@ -567,6 +567,14 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc, if (asoc->init_last_sent_to == peer) asoc->init_last_sent_to = NULL; + /* If we remove the transport an SHUTDOWN was last sent to, set it + * to NULL. Combined with the update of the retran path above, this + * will cause the next SHUTDOWN to be sent to the next available + * transport, maintaining the cycle. + */ + if (asoc->shutdown_last_sent_to == peer) + asoc->shutdown_last_sent_to = NULL; + asoc->peer.transport_count--; sctp_transport_free(peer); diff --git a/trunk/net/sctp/sm_statefuns.c b/trunk/net/sctp/sm_statefuns.c index 55a61aa69662..10abc07d42cb 100644 --- a/trunk/net/sctp/sm_statefuns.c +++ b/trunk/net/sctp/sm_statefuns.c @@ -5432,9 +5432,13 @@ sctp_disposition_t sctp_sf_t2_timer_expire(const struct sctp_endpoint *ep, if (!reply) goto nomem; - /* Do some failure management (Section 8.2). */ - sctp_add_cmd_sf(commands, SCTP_CMD_STRIKE, - SCTP_TRANSPORT(asoc->shutdown_last_sent_to)); + /* Do some failure management (Section 8.2). + * If we remove the transport an SHUTDOWN was last sent to, don't + * do failure management. + */ + if (asoc->shutdown_last_sent_to) + sctp_add_cmd_sf(commands, SCTP_CMD_STRIKE, + SCTP_TRANSPORT(asoc->shutdown_last_sent_to)); /* Set the transport for the SHUTDOWN/ACK chunk and the timeout for * the T2-shutdown timer.