diff options
author | rrs <rrs@FreeBSD.org> | 2007-08-16 01:51:22 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-08-16 01:51:22 +0000 |
commit | 1bcb372970356c4bb20cdd532350ea0df88a6f20 (patch) | |
tree | 2530cafc57ae1f3f5858ead34bf340916e72c7a1 /sys/netinet/sctp_input.c | |
parent | ba0da0a95deba64ddb6dc37fb2698973ff97e1ef (diff) | |
download | FreeBSD-src-1bcb372970356c4bb20cdd532350ea0df88a6f20.zip FreeBSD-src-1bcb372970356c4bb20cdd532350ea0df88a6f20.tar.gz |
- Remove extra comment for 7.0 (no GIANT here).
- Remove unneeded WLOCK/UNLOCK of inp for getting TCB lock.
- Fix panic that may occur when freeing an assoc that has partial
delivery in progress (may dereference null socket pointer when
queuing partial delivery aborted notification)
- Some spacing and comment fixes.
- Fix address add handling to clear cached routes and source addresses
when peer acks the add in case the routing table changes.
Approved by: re@freebsd.org (Bruce Mah)
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 5a278c1..46c23cd 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; |