diff options
author | rrs <rrs@FreeBSD.org> | 2007-09-10 17:06:25 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-09-10 17:06:25 +0000 |
commit | 1b1d8efe7c5c04a996d506e80bd5a2495bd3eeb8 (patch) | |
tree | 3f2005f2098cca5d2196f3fa10ec95b5d77d31b9 /sys/netinet | |
parent | ac7ab500b599547badd5a6b24625311f1a03f5fa (diff) | |
download | FreeBSD-src-1b1d8efe7c5c04a996d506e80bd5a2495bd3eeb8.zip FreeBSD-src-1b1d8efe7c5c04a996d506e80bd5a2495bd3eeb8.tar.gz |
- Added some comments to tell where the htcp
code comes from.
- Fix a LOR on Mac OS X: Do not hold an stcb lock when
calling soisconnected for a socket which has the
SS_INCOMP bit set on so_state.
- fix a comment to be non c++ style.
Approved by: re@freebsd.org (B Mah)
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/sctp_asconf.c | 17 | ||||
-rw-r--r-- | sys/netinet/sctp_cc_functions.h | 9 | ||||
-rw-r--r-- | sys/netinet/sctp_input.c | 4 |
3 files changed, 19 insertions, 11 deletions
diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c index e75f5de..9fa0b47 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 fa1e2fc..5d27aef 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 bcc5045..4913368 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); |