diff options
| author | Randall Stewart <rrs@FreeBSD.org> | 2007-08-16 01:51:22 +0000 |
|---|---|---|
| committer | Randall Stewart <rrs@FreeBSD.org> | 2007-08-16 01:51:22 +0000 |
| commit | 2dad8a55be1dfb349e9fb62add811cef578e85c0 (patch) | |
| tree | 2530cafc57ae1f3f5858ead34bf340916e72c7a1 /sys/netinet/sctp_input.c | |
| parent | 8cb5ba02d87c91b3bab1c799ea6b866cc515955c (diff) | |
Notes
Diffstat (limited to 'sys/netinet/sctp_input.c')
| -rw-r--r-- | sys/netinet/sctp_input.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 5a278c15753c..46c23cd30185 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -2186,16 +2186,13 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, return (m); } oso = (*inp_p)->sctp_socket; - /* - * We do this to keep the sockets side happy durin - * the sonewcon ONLY. - */ + atomic_add_int(&(*stcb)->asoc.refcnt, 1); SCTP_TCB_UNLOCK((*stcb)); so = sonewconn(oso, 0 ); - SCTP_INP_WLOCK((*stcb)->sctp_ep); SCTP_TCB_LOCK((*stcb)); - SCTP_INP_WUNLOCK((*stcb)->sctp_ep); + atomic_subtract_int(&(*stcb)->asoc.refcnt, 1); + if (so == NULL) { struct mbuf *op_err; @@ -3968,7 +3965,6 @@ process_control_chunks: SCTP_TCB_UNLOCK(locked_tcb); } return (NULL); - } if (netp && *netp) { int abort_flag = 0; |
