Not only stop all timers when entering the SHUTDOWN_SENT state,
but also when entering the SHUTDOWN_ACK_SEND state. MFC after: 3 days.
This commit is contained in:
parent
5a3e494e92
commit
128945a395
@ -4369,7 +4369,7 @@ again:
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
sctp_send_shutdown_ack(stcb,
|
||||
stcb->asoc.primary_destination);
|
||||
|
||||
sctp_stop_timers_for_shutdown(stcb);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK,
|
||||
stcb->sctp_ep, stcb, asoc->primary_destination);
|
||||
}
|
||||
@ -5081,7 +5081,7 @@ done_with_it:
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
sctp_send_shutdown_ack(stcb,
|
||||
stcb->asoc.primary_destination);
|
||||
|
||||
sctp_stop_timers_for_shutdown(stcb);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK,
|
||||
stcb->sctp_ep, stcb, asoc->primary_destination);
|
||||
return;
|
||||
|
@ -908,9 +908,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_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, net,
|
||||
SCTP_FROM_SCTP_INPUT + SCTP_LOC_7);
|
||||
/* start SHUTDOWN timer */
|
||||
sctp_stop_timers_for_shutdown(stcb);
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep,
|
||||
stcb, net);
|
||||
}
|
||||
|
@ -724,6 +724,31 @@ sctp_audit_log(uint8_t ev, uint8_t fd)
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* sctp_stop_timers_for_shutdown() should be called
|
||||
* when entering the SHUTDOWN_SENT or SHUTDOWN_ACK_SENT
|
||||
* state to make sure that all timers are stopped.
|
||||
*/
|
||||
void
|
||||
sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb)
|
||||
{
|
||||
struct sctp_association *asoc;
|
||||
struct sctp_nets *net;
|
||||
|
||||
asoc = &stcb->asoc;
|
||||
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->hb_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer);
|
||||
TAILQ_FOREACH(net, &asoc->nets, sctp_next) {
|
||||
(void)SCTP_OS_TIMER_STOP(&net->fr_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* a list of sizes based on typical mtu's, used only if next hop size not
|
||||
* returned.
|
||||
@ -749,26 +774,6 @@ static int sctp_mtu_sizes[] = {
|
||||
65535
|
||||
};
|
||||
|
||||
void
|
||||
sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb)
|
||||
{
|
||||
struct sctp_association *asoc;
|
||||
struct sctp_nets *net;
|
||||
|
||||
asoc = &stcb->asoc;
|
||||
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->hb_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer);
|
||||
TAILQ_FOREACH(net, &asoc->nets, sctp_next) {
|
||||
(void)SCTP_OS_TIMER_STOP(&net->fr_timer.timer);
|
||||
(void)SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
find_next_best_mtu(int totsz)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user