From 51cad52bc8593dea6307a589845c040347dc3b8e Mon Sep 17 00:00:00 2001 From: rrs Date: Sat, 15 Sep 2007 19:07:42 +0000 Subject: - 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) --- sys/netinet/sctp.h | 10 ++-- sys/netinet/sctp_asconf.c | 149 +++++++++++++++++++++++----------------------- sys/netinet/sctp_asconf.h | 6 +- sys/netinet/sctp_input.c | 28 +++++---- sys/netinet/sctp_output.c | 4 +- sys/netinet/sctp_output.h | 2 +- sys/netinet/sctp_sysctl.h | 56 ----------------- sys/netinet/sctp_timer.c | 2 +- 8 files changed, 106 insertions(+), 151 deletions(-) (limited to 'sys') diff --git a/sys/netinet/sctp.h b/sys/netinet/sctp.h index a97b07d..c302606 100644 --- a/sys/netinet/sctp.h +++ b/sys/netinet/sctp.h @@ -290,14 +290,14 @@ __attribute__((packed)); #define SCTP_CAUSE_USER_INITIATED_ABT 0x000c #define SCTP_CAUSE_PROTOCOL_VIOLATION 0x000d -/* Error causes from draft-ietf-tsvwg-addip-sctp */ +/* Error causes from RFC5061 */ #define SCTP_CAUSE_DELETING_LAST_ADDR 0xa0 #define SCTP_CAUSE_RESOURCE_SHORTAGE 0xa1 #define SCTP_CAUSE_DELETING_SRC_ADDR 0xa2 #define SCTP_CAUSE_ILLEGAL_ASCONF_ACK 0xa3 #define SCTP_CAUSE_REQUEST_REFUSED 0xa4 -/* Error causes from draft-ietf-tsvwg-sctp-auth */ +/* Error causes from RFC4895 */ #define SCTP_CAUSE_UNSUPPORTED_HMACID 0x0105 /* @@ -367,11 +367,11 @@ __attribute__((packed)); #define SCTP_ECN_ECHO 0x0c #define SCTP_ECN_CWR 0x0d #define SCTP_SHUTDOWN_COMPLETE 0x0e -/* draft-ietf-tsvwg-sctp-auth */ +/* RFC4895 */ #define SCTP_AUTHENTICATION 0x0f /************0x40 series ***********/ /************0x80 series ***********/ -/* draft-ietf-tsvwg-addip-sctp */ +/* RFC5061 */ #define SCTP_ASCONF_ACK 0x80 /* draft-ietf-stewart-pktdrpsctp */ #define SCTP_PACKET_DROPPED 0x81 @@ -383,7 +383,7 @@ __attribute__((packed)); /************0xc0 series ***********/ /* RFC3758 */ #define SCTP_FORWARD_CUM_TSN 0xc0 -/* draft-ietf-tsvwg-addip-sctp */ +/* RFC5061 */ #define SCTP_ASCONF 0xc1 diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c index 1c56ad8..937c3c7 100644 --- a/sys/netinet/sctp_asconf.c +++ b/sys/netinet/sctp_asconf.c @@ -1204,14 +1204,12 @@ sctp_asconf_addr_mgmt_ack(struct sctp_tcb *stcb, struct sctp_ifa *addr, /* success case, so remove from the restricted list */ sctp_del_local_addr_restricted(stcb, addr); - if (sctp_is_mobility_feature_on(stcb->sctp_ep, SCTP_MOBILITY_BASE)) { + if (sctp_is_mobility_feature_on(stcb->sctp_ep, + SCTP_MOBILITY_BASE)) { sctp_path_check_and_react(stcb, addr); return; } - /* - * clear any cached, topologically incorrect source - * addresses - */ + /* clear any cached/topologically incorrect source addresses */ sctp_asconf_nets_cleanup(stcb, addr->ifn_p); } /* else, leave it on the list */ @@ -1310,6 +1308,7 @@ sctp_asconf_queue_mgmt(struct sctp_tcb *stcb, struct sctp_ifa *ifa, } else { /* invalid family! */ SCTP_FREE(aa, SCTP_M_ASC_ADDR); + sctp_free_ifa(ifa); return (-1); } aa->sent = 0; /* clear sent flag */ @@ -1428,17 +1427,17 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct sctp_ifa *ifa, return (status); } -/* - * add an asconf add/delete IP address parameter to the queue by addr. - * type = SCTP_ADD_IP_ADDRESS, SCTP_DEL_IP_ADDRESS, SCTP_SET_PRIM_ADDR. +/*- + * add an asconf delete IP address parameter to the queue by sockaddr and + * possibly with no sctp_ifa available. This is only called by the routine + * that checks the addresses in an INIT-ACK against the current address list. * returns 0 if completed, non-zero if not completed. - * NOTE: if adding, but delete already scheduled (and not yet sent out), - * simply remove from queue. Same for deleting an address already scheduled - * for add. If a duplicate operation is found, ignore the new one. + * NOTE: if an add is already scheduled (and not yet sent out), simply + * remove it from queue. If a duplicate operation is found, ignore the + * new one. */ static int -sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, - uint16_t type) +sctp_asconf_queue_sa_delete(struct sctp_tcb *stcb, struct sockaddr *sa) { struct sctp_ifa *ifa; struct sctp_asconf_addr *aa, *aa_next; @@ -1459,27 +1458,14 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, if (sctp_asconf_addr_match(aa, sa) == 0) continue; /* is the request already in queue (sent or not) */ - if (aa->ap.aph.ph.param_type == type) { + if (aa->ap.aph.ph.param_type == SCTP_DEL_IP_ADDRESS) { return (-1); } /* is the negative request already in queue, and not sent */ if (aa->sent == 1) continue; - if (type == SCTP_ADD_IP_ADDRESS && - aa->ap.aph.ph.param_type == SCTP_DEL_IP_ADDRESS) { - /* add requested, delete already queued */ - - /* delete the existing entry in the queue */ - TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next); - sctp_free_ifa(aa->ifa); - /* free the entry */ - SCTP_FREE(aa, SCTP_M_ASC_ADDR); - return (-1); - } else if (type == SCTP_DEL_IP_ADDRESS && - aa->ap.aph.ph.param_type == SCTP_ADD_IP_ADDRESS) { - /* delete requested, add already queued */ - - /* delete the existing entry in the queue */ + if (aa->ap.aph.ph.param_type == SCTP_ADD_IP_ADDRESS) { + /* add already queued, so remove existing entry */ TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next); sctp_del_local_addr_restricted(stcb, aa->ifa); /* free the entry */ @@ -1487,31 +1473,30 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, return (-1); } } /* for each aa */ + + /* find any existing ifa-- NOTE ifa CAN be allowed to be NULL */ if (stcb) { vrf_id = stcb->asoc.vrf_id; } else { vrf_id = SCTP_DEFAULT_VRFID; } - ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED); - if (ifa == NULL) { - /* Invalid address */ - return (-1); - } + /* adding new request to the queue */ SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), SCTP_M_ASC_ADDR); if (aa == NULL) { /* didn't get memory */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "asconf_queue_add_sa: failed to get memory!\n"); + "sctp_asconf_queue_sa_delete: failed to get memory!\n"); return (-1); } /* fill in asconf address parameter fields */ /* top level elements are "networked" during send */ - aa->ap.aph.ph.param_type = type; + aa->ap.aph.ph.param_type = SCTP_DEL_IP_ADDRESS; aa->ifa = ifa; - atomic_add_int(&ifa->refcount, 1); + if (ifa) + atomic_add_int(&ifa->refcount, 1); /* correlation_id filled in during send routine later... */ if (sa->sa_family == AF_INET6) { /* IPv6 address */ @@ -1535,21 +1520,14 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, } else { /* invalid family! */ SCTP_FREE(aa, SCTP_M_ASC_ADDR); + if (ifa) + sctp_free_ifa(ifa); return (-1); } aa->sent = 0; /* clear sent flag */ - /* - * if we are deleting an address it should go out last otherwise, - * add it to front of the pending queue - */ - if (type == SCTP_ADD_IP_ADDRESS) { - /* add goes to the front of the queue */ - TAILQ_INSERT_HEAD(&stcb->asoc.asconf_queue, aa, next); - } else { - /* delete and set primary goes to the back of the queue */ - TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); - } + /* delete goes to the back of the queue */ + TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); return (0); } @@ -1663,7 +1641,8 @@ sctp_asconf_process_param_ack(struct sctp_tcb *stcb, /* remove the param and free it */ TAILQ_REMOVE(&stcb->asoc.asconf_queue, aparam, next); - sctp_free_ifa(aparam->ifa); + if (aparam->ifa) + sctp_free_ifa(aparam->ifa); SCTP_FREE(aparam, SCTP_M_ASC_ADDR); } @@ -1681,7 +1660,7 @@ sctp_asconf_ack_clear(struct sctp_tcb *stcb) void sctp_handle_asconf_ack(struct mbuf *m, int offset, struct sctp_asconf_ack_chunk *cp, struct sctp_tcb *stcb, - struct sctp_nets *net) + struct sctp_nets *net, int *abort_no_unlock) { struct sctp_association *asoc; uint32_t serial_num; @@ -1721,6 +1700,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n"); sctp_abort_an_association(stcb->sctp_ep, stcb, SCTP_CAUSE_ILLEGAL_ASCONF_ACK, NULL, SCTP_SO_NOT_LOCKED); + *abort_no_unlock = 1; return; } if (serial_num != asoc->asconf_seq_out) { @@ -1865,7 +1845,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, stcb, net); #else /* we have more params, so send out more */ - sctp_send_asconf(stcb, net); + sctp_send_asconf(stcb, net, SCTP_ADDR_NOT_LOCKED); #endif } } @@ -1907,7 +1887,7 @@ sctp_is_scopeid_in_nets(struct sctp_tcb *stcb, struct sockaddr *sa) */ static void sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct sctp_ifa *ifa, uint16_t type) + struct sctp_ifa *ifa, uint16_t type, int addr_locked) { int status; @@ -2007,7 +1987,8 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, inp, stcb, stcb->asoc.primary_destination); #else - sctp_send_asconf(stcb, stcb->asoc.primary_destination); + sctp_send_asconf(stcb, stcb->asoc.primary_destination, + addr_locked); #endif } } @@ -2249,7 +2230,8 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb, * If we have queued params in the open state, send out an ASCONF. */ if (num_queued > 0) { - sctp_send_asconf(stcb, stcb->asoc.primary_destination); + sctp_send_asconf(stcb, stcb->asoc.primary_destination, + SCTP_ADDR_NOT_LOCKED); } } @@ -2284,10 +2266,22 @@ sctp_asconf_iterator_end(void *ptr, uint32_t val) int32_t sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa) { - /* NOTE: we currently don't check the validity of the address! */ + uint32_t vrf_id; + struct sctp_ifa *ifa; + /* find the ifa for the desired set primary */ + if (stcb) { + vrf_id = stcb->asoc.vrf_id; + } else { + vrf_id = SCTP_DEFAULT_VRFID; + } + ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED); + if (ifa == NULL) { + /* Invalid address */ + return (-1); + } /* queue an ASCONF:SET_PRIM_ADDR to be sent */ - if (!sctp_asconf_queue_add_sa(stcb, sa, SCTP_SET_PRIM_ADDR)) { + if (!sctp_asconf_queue_add(stcb, ifa, SCTP_SET_PRIM_ADDR)) { /* set primary queuing succeeded */ SCTPDBG(SCTP_DEBUG_ASCONF1, "set_primary_ip_address_sa: queued on tcb=%p, ", @@ -2299,7 +2293,8 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa) 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 } } else { @@ -2335,7 +2330,8 @@ sctp_set_primary_ip_address(struct sctp_ifa *ifa) 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 } } @@ -2344,16 +2340,18 @@ sctp_set_primary_ip_address(struct sctp_ifa *ifa) } static struct sockaddr * -sctp_find_valid_localaddr(struct sctp_tcb *stcb) +sctp_find_valid_localaddr(struct sctp_tcb *stcb, int addr_locked) { struct sctp_vrf *vrf = NULL; struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; - SCTP_IPI_ADDR_LOCK(); + if (addr_locked == SCTP_ADDR_NOT_LOCKED) + SCTP_IPI_ADDR_LOCK(); vrf = sctp_find_vrf(stcb->asoc.vrf_id); if (vrf == NULL) { - SCTP_IPI_ADDR_UNLOCK(); + if (addr_locked == SCTP_ADDR_NOT_LOCKED) + SCTP_IPI_ADDR_UNLOCK(); return (NULL); } LIST_FOREACH(sctp_ifn, &vrf->ifnlist, next_ifn) { @@ -2379,7 +2377,8 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb) if (sctp_is_addr_restricted(stcb, sctp_ifa)) continue; /* found a valid local v4 address to use */ - SCTP_IPI_ADDR_UNLOCK(); + if (addr_locked == SCTP_ADDR_NOT_LOCKED) + SCTP_IPI_ADDR_UNLOCK(); return (&sctp_ifa->address.sa); } else if (sctp_ifa->address.sa.sa_family == AF_INET6 && stcb->asoc.ipv6_addr_legal) { @@ -2401,13 +2400,15 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb) continue; /* found a valid local v6 address to use */ - SCTP_IPI_ADDR_UNLOCK(); + if (addr_locked == SCTP_ADDR_NOT_LOCKED) + SCTP_IPI_ADDR_UNLOCK(); return (&sctp_ifa->address.sa); } } } /* no valid addresses found */ - SCTP_IPI_ADDR_UNLOCK(); + if (addr_locked == SCTP_ADDR_NOT_LOCKED) + SCTP_IPI_ADDR_UNLOCK(); return (NULL); } @@ -2436,7 +2437,7 @@ sctp_find_valid_localaddr_ep(struct sctp_tcb *stcb) * returns NULL on error (no mbuf, no ASCONF params queued, etc). */ struct mbuf * -sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen) +sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen, int addr_locked) { struct mbuf *m_asconf, *m_asconf_chk; struct sctp_asconf_addr *aa; @@ -2561,7 +2562,8 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen) caddr_t addr_ptr; if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) - found_addr = sctp_find_valid_localaddr(stcb); + found_addr = sctp_find_valid_localaddr(stcb, + addr_locked); else found_addr = sctp_find_valid_localaddr_ep(stcb); @@ -2697,8 +2699,8 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, } else { vrf_id = SCTP_DEFAULT_VRFID; } - - sctp_ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED); + sctp_ifa = sctp_find_ifa_by_addr(sa, vrf_id, + SCTP_ADDR_NOT_LOCKED); if (sctp_ifa == NULL) { /* address doesn't exist anymore */ int status; @@ -2708,8 +2710,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, SCTP_PCB_FLAGS_DO_ASCONF)) && stcb->asoc.peer_supports_asconf) { /* queue an ASCONF DEL_IP_ADDRESS */ - status = sctp_asconf_queue_add_sa(stcb, sa, - SCTP_DEL_IP_ADDRESS); + status = sctp_asconf_queue_sa_delete(stcb, sa); /* * if queued ok, and in correct state, send * out the ASCONF. @@ -2722,7 +2723,8 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, 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 } } @@ -2880,7 +2882,7 @@ sctp_check_address_list_ep(struct sctp_tcb *stcb, struct mbuf *m, int offset, &laddr->ifa->address.sa)) { /* try to add it */ sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb, laddr->ifa, - SCTP_ADD_IP_ADDRESS); + SCTP_ADD_IP_ADDRESS, SCTP_ADDR_NOT_LOCKED); } } } @@ -2928,7 +2930,8 @@ sctp_check_address_list_all(struct sctp_tcb *stcb, struct mbuf *m, int offset, &sctp_ifa->address.sa)) { /* try to add it */ sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb, - sctp_ifa, SCTP_ADD_IP_ADDRESS); + sctp_ifa, SCTP_ADD_IP_ADDRESS, + SCTP_ADDR_LOCKED); } } /* end foreach ifa */ } /* end foreach ifn */ diff --git a/sys/netinet/sctp_asconf.h b/sys/netinet/sctp_asconf.h index 86006da..ca57c00 100644 --- a/sys/netinet/sctp_asconf.h +++ b/sys/netinet/sctp_asconf.h @@ -43,15 +43,15 @@ __FBSDID("$FreeBSD$"); */ extern void sctp_asconf_cleanup(struct sctp_tcb *, struct sctp_nets *); -extern struct mbuf *sctp_compose_asconf(struct sctp_tcb *, int *); +extern struct mbuf *sctp_compose_asconf(struct sctp_tcb *, int *, int); extern void sctp_handle_asconf(struct mbuf *, unsigned int, struct sctp_asconf_chunk *, struct sctp_tcb *, int i); extern void -sctp_handle_asconf_ack(struct mbuf *, int, - struct sctp_asconf_ack_chunk *, struct sctp_tcb *, struct sctp_nets *); +sctp_handle_asconf_ack(struct mbuf *, int, struct sctp_asconf_ack_chunk *, + struct sctp_tcb *, struct sctp_nets *, int *); extern uint32_t sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct sockaddr *, 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: diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 6deffd1..5c6b8ef 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -8053,7 +8053,7 @@ sctp_send_shutdown(struct sctp_tcb *stcb, struct sctp_nets *net) } void -sctp_send_asconf(struct sctp_tcb *stcb, struct sctp_nets *net) +sctp_send_asconf(struct sctp_tcb *stcb, struct sctp_nets *net, int addr_locked) { /* * formulate and queue an ASCONF to the peer. ASCONF parameters @@ -8066,7 +8066,7 @@ sctp_send_asconf(struct sctp_tcb *stcb, struct sctp_nets *net) SCTP_TCB_LOCK_ASSERT(stcb); /* compose an ASCONF chunk, maximum length is PMTU */ - m_asconf = sctp_compose_asconf(stcb, &len); + m_asconf = sctp_compose_asconf(stcb, &len, addr_locked); if (m_asconf == NULL) { return; } diff --git a/sys/netinet/sctp_output.h b/sys/netinet/sctp_output.h index bd35269..512522f 100644 --- a/sys/netinet/sctp_output.h +++ b/sys/netinet/sctp_output.h @@ -112,7 +112,7 @@ void sctp_send_shutdown_complete2(struct mbuf *, int, struct sctphdr *, uint32_t); -void sctp_send_asconf(struct sctp_tcb *, struct sctp_nets *); +void sctp_send_asconf(struct sctp_tcb *, struct sctp_nets *, int addr_locked); void sctp_send_asconf_ack(struct sctp_tcb *); diff --git a/sys/netinet/sctp_sysctl.h b/sys/netinet/sctp_sysctl.h index 15d9798..3b93b68 100644 --- a/sys/netinet/sctp_sysctl.h +++ b/sys/netinet/sctp_sysctl.h @@ -41,385 +41,330 @@ __FBSDID("$FreeBSD$"); * limits for the sysctl variables */ /* maxdgram: Maximum outgoing SCTP buffer size */ -#define SCTPCTL_MAXDGRAM 1 #define SCTPCTL_MAXDGRAM_DESC "Maximum outgoing SCTP buffer size" #define SCTPCTL_MAXDGRAM_MIN 0 #define SCTPCTL_MAXDGRAM_MAX 0xFFFFFFFF #define SCTPCTL_MAXDGRAM_DEFAULT 262144 /* 256k */ /* recvspace: Maximum incoming SCTP buffer size */ -#define SCTPCTL_RECVSPACE 2 #define SCTPCTL_RECVSPACE_DESC "Maximum incoming SCTP buffer size" #define SCTPCTL_RECVSPACE_MIN 0 #define SCTPCTL_RECVSPACE_MAX 0xFFFFFFFF #define SCTPCTL_RECVSPACE_DEFAULT 262144 /* 256k */ /* autoasconf: Enable SCTP Auto-ASCONF */ -#define SCTPCTL_AUTOASCONF 3 #define SCTPCTL_AUTOASCONF_DESC "Enable SCTP Auto-ASCONF" #define SCTPCTL_AUTOASCONF_MIN 0 #define SCTPCTL_AUTOASCONF_MAX 1 #define SCTPCTL_AUTOASCONF_DEFAULT SCTP_DEFAULT_AUTO_ASCONF /* ecn_enable: Enable SCTP ECN */ -#define SCTPCTL_ECN_ENABLE 4 #define SCTPCTL_ECN_ENABLE_DESC "Enable SCTP ECN" #define SCTPCTL_ECN_ENABLE_MIN 0 #define SCTPCTL_ECN_ENABLE_MAX 1 #define SCTPCTL_ECN_ENABLE_DEFAULT 1 /* ecn_nonce: Enable SCTP ECN Nonce */ -#define SCTPCTL_ECN_NONCE 5 #define SCTPCTL_ECN_NONCE_DESC "Enable SCTP ECN Nonce" #define SCTPCTL_ECN_NONCE_MIN 0 #define SCTPCTL_ECN_NONCE_MAX 1 #define SCTPCTL_ECN_NONCE_DEFAULT 0 /* strict_sacks: Enable SCTP Strict SACK checking */ -#define SCTPCTL_STRICT_SACKS 6 #define SCTPCTL_STRICT_SACKS_DESC "Enable SCTP Strict SACK checking" #define SCTPCTL_STRICT_SACKS_MIN 0 #define SCTPCTL_STRICT_SACKS_MAX 1 #define SCTPCTL_STRICT_SACKS_DEFAULT 0 /* loopback_nocsum: Enable NO Csum on packets sent on loopback */ -#define SCTPCTL_LOOPBACK_NOCSUM 7 #define SCTPCTL_LOOPBACK_NOCSUM_DESC "Enable NO Csum on packets sent on loopback" #define SCTPCTL_LOOPBACK_NOCSUM_MIN 0 #define SCTPCTL_LOOPBACK_NOCSUM_MAX 1 #define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT 1 /* strict_init: Enable strict INIT/INIT-ACK singleton enforcement */ -#define SCTPCTL_STRICT_INIT 8 #define SCTPCTL_STRICT_INIT_DESC "Enable strict INIT/INIT-ACK singleton enforcement" #define SCTPCTL_STRICT_INIT_MIN 0 #define SCTPCTL_STRICT_INIT_MAX 1 #define SCTPCTL_STRICT_INIT_DEFAULT 1 /* peer_chkoh: Amount to debit peers rwnd per chunk sent */ -#define SCTPCTL_PEER_CHKOH 9 #define SCTPCTL_PEER_CHKOH_DESC "Amount to debit peers rwnd per chunk sent" #define SCTPCTL_PEER_CHKOH_MIN 0 #define SCTPCTL_PEER_CHKOH_MAX 0xFFFFFFFF #define SCTPCTL_PEER_CHKOH_DEFAULT 256 /* maxburst: Default max burst for sctp endpoints */ -#define SCTPCTL_MAXBURST 10 #define SCTPCTL_MAXBURST_DESC "Default max burst for sctp endpoints" #define SCTPCTL_MAXBURST_MIN 1 #define SCTPCTL_MAXBURST_MAX 0xFFFFFFFF #define SCTPCTL_MAXBURST_DEFAULT SCTP_DEF_MAX_BURST /* maxchunks: Default max chunks on queue per asoc */ -#define SCTPCTL_MAXCHUNKS 11 #define SCTPCTL_MAXCHUNKS_DESC "Default max chunks on queue per asoc" #define SCTPCTL_MAXCHUNKS_MIN 0 #define SCTPCTL_MAXCHUNKS_MAX 0xFFFFFFFF #define SCTPCTL_MAXCHUNKS_DEFAULT SCTP_ASOC_MAX_CHUNKS_ON_QUEUE /* tcbhashsize: Tuneable for Hash table sizes */ -#define SCTPCTL_TCBHASHSIZE 12 #define SCTPCTL_TCBHASHSIZE_DESC "Tunable for TCB hash table sizes" #define SCTPCTL_TCBHASHSIZE_MIN 1 #define SCTPCTL_TCBHASHSIZE_MAX 0xFFFFFFFF #define SCTPCTL_TCBHASHSIZE_DEFAULT SCTP_TCBHASHSIZE /* pcbhashsize: Tuneable for PCB Hash table sizes */ -#define SCTPCTL_PCBHASHSIZE 13 #define SCTPCTL_PCBHASHSIZE_DESC "Tunable for PCB hash table sizes" #define SCTPCTL_PCBHASHSIZE_MIN 1 #define SCTPCTL_PCBHASHSIZE_MAX 0xFFFFFFFF #define SCTPCTL_PCBHASHSIZE_DEFAULT SCTP_PCBHASHSIZE /* min_split_point: Minimum size when splitting a chunk */ -#define SCTPCTL_MIN_SPLIT_POINT 14 #define SCTPCTL_MIN_SPLIT_POINT_DESC "Minimum size when splitting a chunk" #define SCTPCTL_MIN_SPLIT_POINT_MIN 0 #define SCTPCTL_MIN_SPLIT_POINT_MAX 0xFFFFFFFF #define SCTPCTL_MIN_SPLIT_POINT_DEFAULT SCTP_DEFAULT_SPLIT_POINT_MIN /* chunkscale: Tuneable for Scaling of number of chunks and messages */ -#define SCTPCTL_CHUNKSCALE 15 #define SCTPCTL_CHUNKSCALE_DESC "Tuneable for Scaling of number of chunks and messages" #define SCTPCTL_CHUNKSCALE_MIN 1 #define SCTPCTL_CHUNKSCALE_MAX 0xFFFFFFFF #define SCTPCTL_CHUNKSCALE_DEFAULT SCTP_CHUNKQUEUE_SCALE /* delayed_sack_time: Default delayed SACK timer in msec */ -#define SCTPCTL_DELAYED_SACK_TIME 16 #define SCTPCTL_DELAYED_SACK_TIME_DESC "Default delayed SACK timer in msec" #define SCTPCTL_DELAYED_SACK_TIME_MIN 0 #define SCTPCTL_DELAYED_SACK_TIME_MAX 0xFFFFFFFF #define SCTPCTL_DELAYED_SACK_TIME_DEFAULT SCTP_RECV_MSEC /* sack_freq: Default SACK frequency */ -#define SCTPCTL_SACK_FREQ 17 #define SCTPCTL_SACK_FREQ_DESC "Default SACK frequency" #define SCTPCTL_SACK_FREQ_MIN 0 #define SCTPCTL_SACK_FREQ_MAX 0xFFFFFFFF #define SCTPCTL_SACK_FREQ_DEFAULT SCTP_DEFAULT_SACK_FREQ /* sys_resource: Max number of cached resources in the system */ -#define SCTPCTL_SYS_RESOURCE 18 #define SCTPCTL_SYS_RESOURCE_DESC "Max number of cached resources in the system" #define SCTPCTL_SYS_RESOURCE_MIN 0 #define SCTPCTL_SYS_RESOURCE_MAX 0xFFFFFFFF #define SCTPCTL_SYS_RESOURCE_DEFAULT SCTP_DEF_SYSTEM_RESC_LIMIT /* asoc_resource: Max number of cached resources in an asoc */ -#define SCTPCTL_ASOC_RESOURCE 19 #define SCTPCTL_ASOC_RESOURCE_DESC "Max number of cached resources in an asoc" #define SCTPCTL_ASOC_RESOURCE_MIN 0 #define SCTPCTL_ASOC_RESOURCE_MAX 0xFFFFFFFF #define SCTPCTL_ASOC_RESOURCE_DEFAULT SCTP_DEF_ASOC_RESC_LIMIT /* heartbeat_interval: Default heartbeat interval in msec */ -#define SCTPCTL_HEARTBEAT_INTERVAL 20 #define SCTPCTL_HEARTBEAT_INTERVAL_DESC "Default heartbeat interval in msec" #define SCTPCTL_HEARTBEAT_INTERVAL_MIN 0 #define SCTPCTL_HEARTBEAT_INTERVAL_MAX 0xFFFFFFFF #define SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT SCTP_HB_DEFAULT_MSEC /* pmtu_raise_time: Default PMTU raise timer in sec */ -#define SCTPCTL_PMTU_RAISE_TIME 21 #define SCTPCTL_PMTU_RAISE_TIME_DESC "Default PMTU raise timer in sec" #define SCTPCTL_PMTU_RAISE_TIME_MIN 0 #define SCTPCTL_PMTU_RAISE_TIME_MAX 0xFFFFFFFF #define SCTPCTL_PMTU_RAISE_TIME_DEFAULT SCTP_DEF_PMTU_RAISE_SEC /* shutdown_guard_time: Default shutdown guard timer in sec */ -#define SCTPCTL_SHUTDOWN_GUARD_TIME 22 #define SCTPCTL_SHUTDOWN_GUARD_TIME_DESC "Default shutdown guard timer in sec" #define SCTPCTL_SHUTDOWN_GUARD_TIME_MIN 0 #define SCTPCTL_SHUTDOWN_GUARD_TIME_MAX 0xFFFFFFFF #define SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT SCTP_DEF_MAX_SHUTDOWN_SEC /* secret_lifetime: Default secret lifetime in sec */ -#define SCTPCTL_SECRET_LIFETIME 23 #define SCTPCTL_SECRET_LIFETIME_DESC "Default secret lifetime in sec" #define SCTPCTL_SECRET_LIFETIME_MIN 0 #define SCTPCTL_SECRET_LIFETIME_MAX 0xFFFFFFFF #define SCTPCTL_SECRET_LIFETIME_DEFAULT SCTP_DEFAULT_SECRET_LIFE_SEC /* rto_max: Default maximum retransmission timeout in msec */ -#define SCTPCTL_RTO_MAX 24 #define SCTPCTL_RTO_MAX_DESC "Default maximum retransmission timeout in msec" #define SCTPCTL_RTO_MAX_MIN 0 #define SCTPCTL_RTO_MAX_MAX 0xFFFFFFFF #define SCTPCTL_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND /* rto_min: Default minimum retransmission timeout in msec */ -#define SCTPCTL_RTO_MIN 25 #define SCTPCTL_RTO_MIN_DESC "Default minimum retransmission timeout in msec" #define SCTPCTL_RTO_MIN_MIN 0 #define SCTPCTL_RTO_MIN_MAX 0xFFFFFFFF #define SCTPCTL_RTO_MIN_DEFAULT SCTP_RTO_LOWER_BOUND /* rto_initial: Default initial retransmission timeout in msec */ -#define SCTPCTL_RTO_INITIAL 26 #define SCTPCTL_RTO_INITIAL_DESC "Default initial retransmission timeout in msec" #define SCTPCTL_RTO_INITIAL_MIN 0 #define SCTPCTL_RTO_INITIAL_MAX 0xFFFFFFFF #define SCTPCTL_RTO_INITIAL_DEFAULT SCTP_RTO_INITIAL /* init_rto_max: Default maximum retransmission timeout during association setup in msec */ -#define SCTPCTL_INIT_RTO_MAX 27 #define SCTPCTL_INIT_RTO_MAX_DESC "Default maximum retransmission timeout during association setup in msec" #define SCTPCTL_INIT_RTO_MAX_MIN 0 #define SCTPCTL_INIT_RTO_MAX_MAX 0xFFFFFFFF #define SCTPCTL_INIT_RTO_MAX_DEFAULT SCTP_RTO_UPPER_BOUND /* valid_cookie_life: Default cookie lifetime in sec */ -#define SCTPCTL_VALID_COOKIE_LIFE 28 #define SCTPCTL_VALID_COOKIE_LIFE_DESC "Default cookie lifetime in sec" #define SCTPCTL_VALID_COOKIE_LIFE_MIN 0 #define SCTPCTL_VALID_COOKIE_LIFE_MAX 0xFFFFFFFF #define SCTPCTL_VALID_COOKIE_LIFE_DEFAULT SCTP_DEFAULT_COOKIE_LIFE /* init_rtx_max: Default maximum number of retransmission for INIT chunks */ -#define SCTPCTL_INIT_RTX_MAX 29 #define SCTPCTL_INIT_RTX_MAX_DESC "Default maximum number of retransmission for INIT chunks" #define SCTPCTL_INIT_RTX_MAX_MIN 0 #define SCTPCTL_INIT_RTX_MAX_MAX 0xFFFFFFFF #define SCTPCTL_INIT_RTX_MAX_DEFAULT SCTP_DEF_MAX_INIT /* assoc_rtx_max: Default maximum number of retransmissions per association */ -#define SCTPCTL_ASSOC_RTX_MAX 30 #define SCTPCTL_ASSOC_RTX_MAX_DESC "Default maximum number of retransmissions per association" #define SCTPCTL_ASSOC_RTX_MAX_MIN 0 #define SCTPCTL_ASSOC_RTX_MAX_MAX 0xFFFFFFFF #define SCTPCTL_ASSOC_RTX_MAX_DEFAULT SCTP_DEF_MAX_SEND /* path_rtx_max: Default maximum of retransmissions per path */ -#define SCTPCTL_PATH_RTX_MAX 31 #define SCTPCTL_PATH_RTX_MAX_DESC "Default maximum of retransmissions per path" #define SCTPCTL_PATH_RTX_MAX_MIN 0 #define SCTPCTL_PATH_RTX_MAX_MAX 0xFFFFFFFF #define SCTPCTL_PATH_RTX_MAX_DEFAULT SCTP_DEF_MAX_PATH_RTX /* add_more_on_output: When space wise is it worthwhile to try to add more to a socket send buffer */ -#define SCTPCTL_ADD_MORE_ON_OUTPUT 32 #define SCTPCTL_ADD_MORE_ON_OUTPUT_DESC "When space wise is it worthwhile to try to add more to a socket send buffer" #define SCTPCTL_ADD_MORE_ON_OUTPUT_MIN 0 #define SCTPCTL_ADD_MORE_ON_OUTPUT_MAX 0xFFFFFFFF #define SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT SCTP_DEFAULT_ADD_MORE /* outgoing_streams: Default number of outgoing streams */ -#define SCTPCTL_OUTGOING_STREAMS 33 #define SCTPCTL_OUTGOING_STREAMS_DESC "Default number of outgoing streams" #define SCTPCTL_OUTGOING_STREAMS_MIN 1 #define SCTPCTL_OUTGOING_STREAMS_MAX 65535 #define SCTPCTL_OUTGOING_STREAMS_DEFAULT SCTP_OSTREAM_INITIAL /* cmt_on_off: CMT on/off flag */ -#define SCTPCTL_CMT_ON_OFF 34 #define SCTPCTL_CMT_ON_OFF_DESC "CMT on/off flag" #define SCTPCTL_CMT_ON_OFF_MIN 0 #define SCTPCTL_CMT_ON_OFF_MAX 1 #define SCTPCTL_CMT_ON_OFF_DEFAULT 0 /* cmt_use_dac: CMT DAC on/off flag */ -#define SCTPCTL_CMT_USE_DAC 35 #define SCTPCTL_CMT_USE_DAC_DESC "CMT DAC on/off flag" #define SCTPCTL_CMT_USE_DAC_MIN 0 #define SCTPCTL_CMT_USE_DAC_MAX 1 #define SCTPCTL_CMT_USE_DAC_DEFAULT 0 /* JRS 5/2107 - CMT PF type flag */ -#define SCTPCTL_CMT_PF 36 #define SCTPCTL_CMT_PF_DESC "CMT PF type flag" #define SCTPCTL_CMT_PF_MIN 0 #define SCTPCTL_CMT_PF_MAX 2 #define SCTPCTL_CMT_PF_DEFAULT 0 /* cwnd_maxburst: Use a CWND adjusting maxburst */ -#define SCTPCTL_CWND_MAXBURST 37 #define SCTPCTL_CWND_MAXBURST_DESC "Use a CWND adjusting maxburst" #define SCTPCTL_CWND_MAXBURST_MIN 0 #define SCTPCTL_CWND_MAXBURST_MAX 1 #define SCTPCTL_CWND_MAXBURST_DEFAULT 1 /* early_fast_retran: Early Fast Retransmit with timer */ -#define SCTPCTL_EARLY_FAST_RETRAN 38 #define SCTPCTL_EARLY_FAST_RETRAN_DESC "Early Fast Retransmit with timer" #define SCTPCTL_EARLY_FAST_RETRAN_MIN 0 #define SCTPCTL_EARLY_FAST_RETRAN_MAX 0xFFFFFFFF #define SCTPCTL_EARLY_FAST_RETRAN_DEFAULT 0 /* early_fast_retran_msec: Early Fast Retransmit minimum timer value */ -#define SCTPCTL_EARLY_FAST_RETRAN_MSEC 39 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_DESC "Early Fast Retransmit minimum timer value" #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_MIN 0 #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_MAX 0xFFFFFFFF #define SCTPCTL_EARLY_FAST_RETRAN_MSEC_DEFAULT SCTP_MINFR_MSEC_TIMER /* asconf_auth_nochk: Disable SCTP ASCONF AUTH requirement */ -#define SCTPCTL_ASCONF_AUTH_NOCHK 40 #define SCTPCTL_ASCONF_AUTH_NOCHK_DESC "Disable SCTP ASCONF AUTH requirement" #define SCTPCTL_ASCONF_AUTH_NOCHK_MIN 0 #define SCTPCTL_ASCONF_AUTH_NOCHK_MAX 1 #define SCTPCTL_ASCONF_AUTH_NOCHK_DEFAULT 0 /* auth_disable: Disable SCTP AUTH function */ -#define SCTPCTL_AUTH_DISABLE 41 #define SCTPCTL_AUTH_DISABLE_DESC "Disable SCTP AUTH function" #define SCTPCTL_AUTH_DISABLE_MIN 0 #define SCTPCTL_AUTH_DISABLE_MAX 1 #define SCTPCTL_AUTH_DISABLE_DEFAULT 0 /* nat_friendly: SCTP NAT friendly operation */ -#define SCTPCTL_NAT_FRIENDLY 42 #define SCTPCTL_NAT_FRIENDLY_DESC "SCTP NAT friendly operation" #define SCTPCTL_NAT_FRIENDLY_MIN 0 #define SCTPCTL_NAT_FRIENDLY_MAX 1 #define SCTPCTL_NAT_FRIENDLY_DEFAULT 1 /* abc_l_var: SCTP ABC max increase per SACK (L) */ -#define SCTPCTL_ABC_L_VAR 43 #define SCTPCTL_ABC_L_VAR_DESC "SCTP ABC max increase per SACK (L)" #define SCTPCTL_ABC_L_VAR_MIN 0 #define SCTPCTL_ABC_L_VAR_MAX 0xFFFFFFFF #define SCTPCTL_ABC_L_VAR_DEFAULT 1 /* max_chained_mbufs: Default max number of small mbufs on a chain */ -#define SCTPCTL_MAX_CHAINED_MBUFS 44 #define SCTPCTL_MAX_CHAINED_MBUFS_DESC "Default max number of small mbufs on a chain" #define SCTPCTL_MAX_CHAINED_MBUFS_MIN 0 #define SCTPCTL_MAX_CHAINED_MBUFS_MAX 0xFFFFFFFF #define SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT SCTP_DEFAULT_MBUFS_IN_CHAIN /* do_sctp_drain: Should SCTP respond to the drain calls */ -#define SCTPCTL_DO_SCTP_DRAIN 45 #define SCTPCTL_DO_SCTP_DRAIN_DESC "Should SCTP respond to the drain calls" #define SCTPCTL_DO_SCTP_DRAIN_MIN 0 #define SCTPCTL_DO_SCTP_DRAIN_MAX 1 #define SCTPCTL_DO_SCTP_DRAIN_DEFAULT 1 /* hb_max_burst: Confirmation Heartbeat max burst? */ -#define SCTPCTL_HB_MAX_BURST 46 #define SCTPCTL_HB_MAX_BURST_DESC "Confirmation Heartbeat max burst" #define SCTPCTL_HB_MAX_BURST_MIN 1 #define SCTPCTL_HB_MAX_BURST_MAX 0xFFFFFFFF #define SCTPCTL_HB_MAX_BURST_DEFAULT SCTP_DEF_MAX_BURST /* abort_at_limit: When one-2-one hits qlimit abort */ -#define SCTPCTL_ABORT_AT_LIMIT 47 #define SCTPCTL_ABORT_AT_LIMIT_DESC "When one-2-one hits qlimit abort" #define SCTPCTL_ABORT_AT_LIMIT_MIN 0 #define SCTPCTL_ABORT_AT_LIMIT_MAX 1 #define SCTPCTL_ABORT_AT_LIMIT_DEFAULT 0 /* strict_data_order: Enforce strict data ordering, abort if control inside data */ -#define SCTPCTL_STRICT_DATA_ORDER 48 #define SCTPCTL_STRICT_DATA_ORDER_DESC "Enforce strict data ordering, abort if control inside data" #define SCTPCTL_STRICT_DATA_ORDER_MIN 0 #define SCTPCTL_STRICT_DATA_ORDER_MAX 1 #define SCTPCTL_STRICT_DATA_ORDER_DEFAULT 0 /* min_residual: min residual in a data fragment leftover */ -#define SCTPCTL_MIN_REDIDUAL 49 #define SCTPCTL_MIN_RESIDUAL_DESC "Minimum residual data chunk in second part of split" #define SCTPCTL_MIN_RESIDUAL_MIN 20 #define SCTPCTL_MIN_RESIDUAL_MAX 65535 #define SCTPCTL_MIN_RESIDUAL_DEFAULT 1452 /* max_retran_chunk: max chunk retransmissions */ -#define SCTPCTL_MAX_RETRAN_CHUNK 50 #define SCTPCTL_MAX_RETRAN_CHUNK_DESC "Maximum times an unlucky chunk can be retran'd before assoc abort" #define SCTPCTL_MAX_RETRAN_CHUNK_MIN 0 #define SCTPCTL_MAX_RETRAN_CHUNK_MAX 65535 #define SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT 30 /* sctp_logging: This gives us logging when the options are enabled */ -#define SCTPCTL_LOGGING_LEVEL 51 #define SCTPCTL_LOGGING_LEVEL_DESC "Ltrace/KTR trace logging level" #define SCTPCTL_LOGGING_LEVEL_MIN 0 #define SCTPCTL_LOGGING_LEVEL_MAX 0xffffffff #define SCTPCTL_LOGGING_LEVEL_DEFAULT 0 /* JRS - default congestion control module sysctl */ -#define SCTPCTL_DEFAULT_CC_MODULE 52 #define SCTPCTL_DEFAULT_CC_MODULE_DESC "Default congestion control module" #define SCTPCTL_DEFAULT_CC_MODULE_MIN 0 #define SCTPCTL_DEFAULT_CC_MODULE_MAX 2 #define SCTPCTL_DEFAULT_CC_MODULE_DEFAULT 0 /* RRS - default fragment interleave */ -#define SCTPCTL_DEFAULT_FRAG_INTERLEAVE 53 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC "Default fragment interleave level" #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN 0 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX 2 #define SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT 1 /* mobility_base: Enable SCTP mobility support */ -#define SCTPCTL_MOBILITY_BASE 54 #define SCTPCTL_MOBILITY_BASE_DESC "Enable SCTP base mobility" #define SCTPCTL_MOBILITY_BASE_MIN 0 #define SCTPCTL_MOBILITY_BASE_MAX 1 #define SCTPCTL_MOBILITY_BASE_DEFAULT SCTP_DEFAULT_MOBILITY_BASE /* mobility_fasthandoff: Enable SCTP fast handoff support */ -#define SCTPCTL_MOBILITY_FASTHANDOFF 55 #define SCTPCTL_MOBILITY_FASTHANDOFF_DESC "Enable SCTP fast handoff" #define SCTPCTL_MOBILITY_FASTHANDOFF_MIN 0 #define SCTPCTL_MOBILITY_FASTHANDOFF_MAX 1 @@ -427,7 +372,6 @@ __FBSDID("$FreeBSD$"); #if defined(SCTP_DEBUG) /* debug: Configure debug output */ -#define SCTPCTL_DEBUG 56 #define SCTPCTL_DEBUG_DESC "Configure debug output" #define SCTPCTL_DEBUG_MIN 0 #define SCTPCTL_DEBUG_MAX 0xFFFFFFFF diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index e9b28b6..d90c56d 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -1316,7 +1316,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* is this a first send, or a retransmission? */ if (stcb->asoc.asconf_sent == 0) { /* compose a new ASCONF chunk and send it */ - sctp_send_asconf(stcb, net); + sctp_send_asconf(stcb, net, SCTP_ADDR_NOT_LOCKED); } else { /* * Retransmission of the existing ASCONF is needed -- cgit v1.1