diff options
author | Michael Tuexen <tuexen@fh-muenster.de> | 2020-03-23 12:58:17 +0100 |
---|---|---|
committer | Michael Tuexen <tuexen@fh-muenster.de> | 2020-03-23 12:58:17 +0100 |
commit | 134be30cfc14e50aff16d42899a5adfef110ed10 (patch) | |
tree | b11087d3b9390988462915f8d7656f7ee3524b8a | |
parent | 1e15794b1d8d3d16047ccc2826ab2d24745d39e4 (diff) | |
download | usrsctp-134be30cfc14e50aff16d42899a5adfef110ed10.tar.gz |
More timer cleanups.
-rwxr-xr-x | usrsctplib/netinet/sctp_asconf.c | 5 | ||||
-rwxr-xr-x | usrsctplib/netinet/sctp_input.c | 5 | ||||
-rwxr-xr-x | usrsctplib/netinet/sctp_timer.c | 26 | ||||
-rwxr-xr-x | usrsctplib/netinet/sctp_timer.h | 11 | ||||
-rwxr-xr-x | usrsctplib/netinet/sctputil.c | 6 |
5 files changed, 21 insertions, 32 deletions
diff --git a/usrsctplib/netinet/sctp_asconf.c b/usrsctplib/netinet/sctp_asconf.c index 959f2f3d..b0668bfc 100755 --- a/usrsctplib/netinet/sctp_asconf.c +++ b/usrsctplib/netinet/sctp_asconf.c @@ -34,7 +34,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 359152 2020-03-19 21:01:16Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 359195 2020-03-21 16:12:19Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -602,8 +602,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, sctp_move_chunks_from_net(stcb, stcb->asoc.deleted_primary); } - sctp_delete_prim_timer(stcb->sctp_ep, stcb, - stcb->asoc.deleted_primary); + sctp_delete_prim_timer(stcb->sctp_ep, stcb); } } else { /* couldn't set the requested primary address! */ diff --git a/usrsctplib/netinet/sctp_input.c b/usrsctplib/netinet/sctp_input.c index f24361a8..7922a067 100755 --- a/usrsctplib/netinet/sctp_input.c +++ b/usrsctplib/netinet/sctp_input.c @@ -34,7 +34,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_input.c 359152 2020-03-19 21:01:16Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_input.c 359195 2020-03-21 16:12:19Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -778,8 +778,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *cp, sctp_move_chunks_from_net(stcb, stcb->asoc.deleted_primary); } - sctp_delete_prim_timer(stcb->sctp_ep, stcb, - stcb->asoc.deleted_primary); + sctp_delete_prim_timer(stcb->sctp_ep, stcb); } } } diff --git a/usrsctplib/netinet/sctp_timer.c b/usrsctplib/netinet/sctp_timer.c index 0f52e0b7..307c0ed6 100755 --- a/usrsctplib/netinet/sctp_timer.c +++ b/usrsctplib/netinet/sctp_timer.c @@ -34,7 +34,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.c 359152 2020-03-19 21:01:16Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.c 359195 2020-03-21 16:12:19Z tuexen $"); #endif #define _IP_VHL @@ -1268,8 +1268,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* Mobility adaptation */ void -sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct sctp_nets *net SCTP_UNUSED) +sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb) { if (stcb->asoc.deleted_primary == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "delete_prim_timer: deleted_primary is not stored...\n"); @@ -1540,9 +1539,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *inp, } void -sctp_autoclose_timer(struct sctp_inpcb *inp, - struct sctp_tcb *stcb, - struct sctp_nets *net) +sctp_autoclose_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb) { struct timeval tn, *tim_touse; struct sctp_association *asoc; @@ -1581,7 +1578,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, */ if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) { /* only send SHUTDOWN 1st time thru */ - struct sctp_nets *netp; + struct sctp_nets *net; if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { @@ -1590,17 +1587,15 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, SCTP_SET_STATE(stcb, SCTP_STATE_SHUTDOWN_SENT); sctp_stop_timers_for_shutdown(stcb); if (stcb->asoc.alternate) { - netp = stcb->asoc.alternate; + net = stcb->asoc.alternate; } else { - netp = stcb->asoc.primary_destination; + net = stcb->asoc.primary_destination; } - sctp_send_shutdown(stcb, netp); + sctp_send_shutdown(stcb, net); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, - stcb->sctp_ep, stcb, - netp); + stcb->sctp_ep, stcb, net); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, - netp); + stcb->sctp_ep, stcb, NULL); } } } else { @@ -1613,8 +1608,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, /* fool the timer startup to use the time left */ tmp = asoc->sctp_autoclose_ticks; asoc->sctp_autoclose_ticks -= ticks_gone_by; - sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, - net); + sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL); /* restore the real tick value */ asoc->sctp_autoclose_ticks = tmp; } diff --git a/usrsctplib/netinet/sctp_timer.h b/usrsctplib/netinet/sctp_timer.h index 90e80032..0204cf44 100755 --- a/usrsctplib/netinet/sctp_timer.h +++ b/usrsctplib/netinet/sctp_timer.h @@ -34,7 +34,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.h 359151 2020-03-19 18:55:54Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.h 359195 2020-03-21 16:12:19Z tuexen $"); #endif #ifndef _NETINET_SCTP_TIMER_H_ @@ -46,8 +46,7 @@ __FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.h 359151 2020-03-19 18:55:54Z tu #define SCTP_RTT_VAR_SHIFT 2 struct sctp_nets * -sctp_find_alternate_net(struct sctp_tcb *, - struct sctp_nets *, int mode); +sctp_find_alternate_net(struct sctp_tcb *, struct sctp_nets *, int); int sctp_t3rxt_timer(struct sctp_inpcb *, struct sctp_tcb *, @@ -84,12 +83,10 @@ sctp_asconf_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); void -sctp_delete_prim_timer(struct sctp_inpcb *, struct sctp_tcb *, - struct sctp_nets *); +sctp_delete_prim_timer(struct sctp_inpcb *, struct sctp_tcb *); void -sctp_autoclose_timer(struct sctp_inpcb *, struct sctp_tcb *, - struct sctp_nets *net); +sctp_autoclose_timer(struct sctp_inpcb *, struct sctp_tcb *); void sctp_audit_retranmission_queue(struct sctp_association *); diff --git a/usrsctplib/netinet/sctputil.c b/usrsctplib/netinet/sctputil.c index 662fd3ba..bdeef124 100755 --- a/usrsctplib/netinet/sctputil.c +++ b/usrsctplib/netinet/sctputil.c @@ -34,7 +34,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 359152 2020-03-19 21:01:16Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctputil.c 359195 2020-03-21 16:12:19Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -2029,7 +2029,7 @@ sctp_timeout_handler(void *t) break; } SCTP_STAT_INCR(sctps_timoautoclose); - sctp_autoclose_timer(inp, stcb, net); + sctp_autoclose_timer(inp, stcb); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_SO_NOT_LOCKED); did_output = 0; break; @@ -2101,7 +2101,7 @@ sctp_timeout_handler(void *t) if ((stcb == NULL) || (inp == NULL)) { break; } - sctp_delete_prim_timer(inp, stcb, net); + sctp_delete_prim_timer(inp, stcb); SCTP_STAT_INCR(sctps_timodelprim); break; default: |