diff options
author | tuexen <tuexen@FreeBSD.org> | 2015-08-29 17:26:29 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2015-08-29 17:26:29 +0000 |
commit | 646fffa685a28399047bfa8407528bb40d016d52 (patch) | |
tree | 32be5d893ae076e19947f839c2f1cc8cf9274ce4 /sys/netinet/sctputil.c | |
parent | 8bd4abbe51bc66a6c7067202c60c7ce251631e52 (diff) | |
download | FreeBSD-src-646fffa685a28399047bfa8407528bb40d016d52.zip FreeBSD-src-646fffa685a28399047bfa8407528bb40d016d52.tar.gz |
Use 5 times RTO.Max as the default for the shutdown guard timer
as required by RFC 4960. The sysctl variable can be used to
overwrite this.
Discussed with: rrs
MFC after: 1 week
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r-- | sys/netinet/sctputil.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 3030994..c31f557 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -2123,7 +2123,11 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (stcb == NULL) { return; } - to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN]; + if (inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN] == 0) { + to_ticks = 5 * MSEC_TO_TICKS(stcb->asoc.maxrto); + } else { + to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN]; + } tmr = &stcb->asoc.shut_guard_timer; break; case SCTP_TIMER_TYPE_STRRESET: |