Remove an optimization, which was incorrect a couple of times and

therefore doesn't seem worth to be there.
In this case COOKIE where not retransmitted anymore, when the
socket was already closed.

MFC after:		1 week
This commit is contained in:
Michael Tuexen 2020-03-25 18:20:37 +00:00
parent 37686ccf08
commit 7c63520c42
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359306

View file

@ -1659,28 +1659,10 @@ sctp_timeout_handler(void *t)
KASSERT(tmr->self == tmr, ("tmr->self corrupted"));
KASSERT(SCTP_IS_TIMER_TYPE_VALID(tmr->type), ("Invalid timer type %d", tmr->type));
type = tmr->type;
tmr->stopped_from = 0xa001;
if (inp) {
SCTP_INP_INCR_REF(inp);
if ((inp->sctp_socket == NULL) &&
((type != SCTP_TIMER_TYPE_INPKILL) &&
(type != SCTP_TIMER_TYPE_INIT) &&
(type != SCTP_TIMER_TYPE_SEND) &&
(type != SCTP_TIMER_TYPE_RECV) &&
(type != SCTP_TIMER_TYPE_HEARTBEAT) &&
(type != SCTP_TIMER_TYPE_SHUTDOWN) &&
(type != SCTP_TIMER_TYPE_SHUTDOWNACK) &&
(type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) &&
(type != SCTP_TIMER_TYPE_ASOCKILL))) {
SCTP_INP_DECR_REF(inp);
SCTPDBG(SCTP_DEBUG_TIMER2,
"Timer type %d handler exiting due to closed socket.\n",
type);
CURVNET_RESTORE();
return;
}
}
tmr->stopped_from = 0xa002;
tmr->stopped_from = 0xa001;
if (stcb) {
atomic_add_int(&stcb->asoc.refcnt, 1);
if (stcb->asoc.state == 0) {
@ -1695,7 +1677,7 @@ sctp_timeout_handler(void *t)
return;
}
}
tmr->stopped_from = 0xa003;
tmr->stopped_from = 0xa002;
SCTPDBG(SCTP_DEBUG_TIMER2, "Timer type %d goes off.\n", type);
if (!SCTP_OS_TIMER_ACTIVE(&tmr->timer)) {
if (inp) {
@ -1710,8 +1692,8 @@ sctp_timeout_handler(void *t)
CURVNET_RESTORE();
return;
}
tmr->stopped_from = 0xa004;
tmr->stopped_from = 0xa003;
if (stcb) {
SCTP_TCB_LOCK(stcb);
atomic_add_int(&stcb->asoc.refcnt, -1);