summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_input.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2013-02-09 08:27:08 +0000
committertuexen <tuexen@FreeBSD.org>2013-02-09 08:27:08 +0000
commit6b769b5afefaf0b88416cf767ecb7f0c9e004cd9 (patch)
tree12847ba482517b2d78be1fe404f4df8c38b51e5d /sys/netinet/sctp_input.c
parent538377b2eacd958c3efd0a185f87e25955afa4f2 (diff)
downloadFreeBSD-src-6b769b5afefaf0b88416cf767ecb7f0c9e004cd9.zip
FreeBSD-src-6b769b5afefaf0b88416cf767ecb7f0c9e004cd9.tar.gz
Fix a bug where HEARTBEATs were still sent in SHUTDOWN_SENT or
SHUTDOWN_ACK_SENT state. While there, make the corresponding code consistent. MFC after: 1 week
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r--sys/netinet/sctp_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index c70bc03..511c1e2 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -956,7 +956,6 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
} else {
/* no outstanding data to send, so move on... */
/* send SHUTDOWN-ACK */
- sctp_send_shutdown_ack(stcb, net);
/* move to SHUTDOWN-ACK-SENT state */
if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) ||
(SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
@@ -965,6 +964,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_ACK_SENT);
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
sctp_stop_timers_for_shutdown(stcb);
+ sctp_send_shutdown_ack(stcb, net);
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep,
stcb, net);
}
OpenPOWER on IntegriCloud