diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c index e75f5de2793f..9fa0b471499f 100644 --- a/sys/netinet/sctp_asconf.c +++ b/sys/netinet/sctp_asconf.c @@ -1026,13 +1026,12 @@ void sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, struct sctp_nets *dstnet) { int error; - struct sctp_tmit_chunk *chk; + struct sctp_tmit_chunk *debug_chk; /* for debug */ - //for debug - if (dstnet->dest_state & SCTP_ADDR_UNCONFIRMED) { - SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: specified destination is UNCONFIRMED\n"); - return; - } + if (dstnet->dest_state & SCTP_ADDR_UNCONFIRMED) { + SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: specified destination is UNCONFIRMED\n"); + return; + } if (stcb->asoc.deleted_primary == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: Funny, old primary is not stored\n"); return; @@ -1065,10 +1064,10 @@ sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, struct sctp_nets *dstnet) #endif /* Debug code */ SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: calling chunk_output, retran_cnt is %d\n", stcb->asoc.sent_queue_retran_cnt); - TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { + TAILQ_FOREACH(debug_chk, &stcb->asoc.sent_queue, sctp_next) { SCTPDBG(SCTP_DEBUG_ASCONF1, "assoc_immediate_retrans: chk->whoTo is "); - SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &chk->whoTo->ro._l_addr.sa); - SCTPDBG(SCTP_DEBUG_ASCONF1, "state is %d\n", chk->sent); + SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &debug_chk->whoTo->ro._l_addr.sa); + SCTPDBG(SCTP_DEBUG_ASCONF1, "state is %d\n", debug_chk->sent); } /* end Debug code */ sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); diff --git a/sys/netinet/sctp_cc_functions.h b/sys/netinet/sctp_cc_functions.h index fa1e2fc2a3fc..5d27aef00951 100644 --- a/sys/netinet/sctp_cc_functions.h +++ b/sys/netinet/sctp_cc_functions.h @@ -78,6 +78,15 @@ void sctp_cwnd_update_after_fr_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *net); +/* + * HTCP algorithms are directly taken from + * R.N.Shorten, D.J.Leith and are work/outcome from + * a Cisco-URP grant to enhance HTCP for satellite + * communications. We use the BSD Liscense + * granted from his source and have modified his + * algorithms to fit within the SCTP BSD framework. + */ + void sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net); diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index bcc50452578a..491336829dbf 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -2513,11 +2513,11 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, atomic_add_int(&(*stcb)->asoc.refcnt, 1); SCTP_TCB_UNLOCK((*stcb)); SCTP_SOCKET_LOCK(so, 1); - SCTP_TCB_LOCK((*stcb)); - atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); #endif soisconnected(so); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + SCTP_TCB_LOCK((*stcb)); + atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); SCTP_SOCKET_UNLOCK(so, 1); #endif return (m);