- 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)
This commit is contained in:
Randall Stewart 2007-09-10 17:06:25 +00:00
parent 6590a6cc3d
commit b7a446b8b7
3 changed files with 19 additions and 11 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);