summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_input.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-09-15 19:07:42 +0000
committerrrs <rrs@FreeBSD.org>2007-09-15 19:07:42 +0000
commit51cad52bc8593dea6307a589845c040347dc3b8e (patch)
tree92cddda5be32744477c77e22e3d345f35d80c1cf /sys/netinet/sctp_input.c
parent20b10da7063cd4f24e83139ffcb5c6c7eec6f5ed (diff)
downloadFreeBSD-src-51cad52bc8593dea6307a589845c040347dc3b8e.zip
FreeBSD-src-51cad52bc8593dea6307a589845c040347dc3b8e.tar.gz
- Get rid of unsused constants for sysctl variables.
- Fix panic from mutex unlock on freed lock when ASCONF-ACK aborts an assoc - Fix panic from addr lock recursion when ASCONFs are queued in the front states - ASCONFs "queued" in the front states should really be bundled after the COOKIE-ACK, not in front of it - Fix issue with addresses deleted in the front states from being sent with ASCONF(DELETE)-- replaced sctp_asconf_queue_add_sa() with delete specific function - Comment change in sctp.h the drafts are now RFC's Approved by: re@freebsd.org (B Mah)
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r--sys/netinet/sctp_input.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index aaa74b5..6bc1473 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -1981,13 +1981,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
return (NULL);
}
- sctp_check_address_list(stcb, m,
- initack_offset + sizeof(struct sctp_init_ack_chunk),
- initack_limit - (initack_offset + sizeof(struct sctp_init_ack_chunk)),
- initack_src, cookie->local_scope, cookie->site_scope,
- cookie->ipv4_scope, cookie->loopback_scope);
-
-
/* set up to notify upper layer */
*notification = SCTP_NOTIFY_ASSOC_UP;
if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
@@ -2034,14 +2027,26 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) {
sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL);
}
- /* respond with a COOKIE-ACK */
/* calculate the RTT */
(void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
if ((netp) && (*netp)) {
(*netp)->RTO = sctp_calculate_rto(stcb, asoc, *netp,
&cookie->time_entered, sctp_align_unsafe_makecopy);
}
+ /* respond with a COOKIE-ACK */
sctp_send_cookie_ack(stcb);
+
+ /*
+ * check the address lists for any ASCONFs that need to be sent
+ * AFTER the cookie-ack is sent
+ */
+ sctp_check_address_list(stcb, m,
+ initack_offset + sizeof(struct sctp_init_ack_chunk),
+ initack_limit - (initack_offset + sizeof(struct sctp_init_ack_chunk)),
+ initack_src, cookie->local_scope, cookie->site_scope,
+ cookie->ipv4_scope, cookie->loopback_scope);
+
+
return (stcb);
}
@@ -2613,7 +2618,8 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp,
stcb->sctp_ep, stcb,
stcb->asoc.primary_destination);
#else
- sctp_send_asconf(stcb, stcb->asoc.primary_destination);
+ sctp_send_asconf(stcb, stcb->asoc.primary_destination,
+ SCTP_ADDR_NOT_LOCKED);
#endif
}
}
@@ -4609,7 +4615,9 @@ process_control_chunks:
}
stcb->asoc.overall_error_count = 0;
sctp_handle_asconf_ack(m, *offset,
- (struct sctp_asconf_ack_chunk *)ch, stcb, *netp);
+ (struct sctp_asconf_ack_chunk *)ch, stcb, *netp, &abort_no_unlock);
+ if (abort_no_unlock)
+ return (NULL);
}
break;
case SCTP_FORWARD_CUM_TSN:
OpenPOWER on IntegriCloud