Fix unused parameter warnings.
While there, fix some whitespace issues. MFC after: 3 months.
This commit is contained in:
parent
cb3b0d8fb9
commit
7215cc1b74
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -1261,8 +1261,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struct sctp_ifa *newifa)
|
|||||||
* flag: 1=success, 0=failure.
|
* flag: 1=success, 0=failure.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
sctp_asconf_addr_mgmt_ack(struct sctp_tcb *stcb, struct sctp_ifa *addr,
|
sctp_asconf_addr_mgmt_ack(struct sctp_tcb *stcb, struct sctp_ifa *addr, uint32_t flag)
|
||||||
uint16_t type, uint32_t flag)
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* do the necessary asoc list work- if we get a failure indication,
|
* do the necessary asoc list work- if we get a failure indication,
|
||||||
@ -1712,7 +1711,7 @@ sctp_asconf_process_param_ack(struct sctp_tcb *stcb,
|
|||||||
case SCTP_ADD_IP_ADDRESS:
|
case SCTP_ADD_IP_ADDRESS:
|
||||||
SCTPDBG(SCTP_DEBUG_ASCONF1,
|
SCTPDBG(SCTP_DEBUG_ASCONF1,
|
||||||
"process_param_ack: added IP address\n");
|
"process_param_ack: added IP address\n");
|
||||||
sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, param_type, flag);
|
sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, flag);
|
||||||
break;
|
break;
|
||||||
case SCTP_DEL_IP_ADDRESS:
|
case SCTP_DEL_IP_ADDRESS:
|
||||||
SCTPDBG(SCTP_DEBUG_ASCONF1,
|
SCTPDBG(SCTP_DEBUG_ASCONF1,
|
||||||
@ -2102,7 +2101,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val)
|
sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_asconf_iterator *asc;
|
struct sctp_asconf_iterator *asc;
|
||||||
struct sctp_ifa *ifa;
|
struct sctp_ifa *ifa;
|
||||||
@ -2150,7 +2149,7 @@ sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val)
|
sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_ifa *ifa;
|
struct sctp_ifa *ifa;
|
||||||
struct sctp_asconf_iterator *asc;
|
struct sctp_asconf_iterator *asc;
|
||||||
@ -2182,7 +2181,7 @@ sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val)
|
|||||||
|
|
||||||
void
|
void
|
||||||
sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||||
void *ptr, uint32_t val)
|
void *ptr, uint32_t val SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_asconf_iterator *asc;
|
struct sctp_asconf_iterator *asc;
|
||||||
struct sctp_ifa *ifa;
|
struct sctp_ifa *ifa;
|
||||||
@ -2350,7 +2349,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_asconf_iterator_end(void *ptr, uint32_t val)
|
sctp_asconf_iterator_end(void *ptr, uint32_t val SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_asconf_iterator *asc;
|
struct sctp_asconf_iterator *asc;
|
||||||
struct sctp_ifa *ifa;
|
struct sctp_ifa *ifa;
|
||||||
@ -3009,8 +3008,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m,
|
|||||||
* 1 if found, 0 if not
|
* 1 if found, 0 if not
|
||||||
*/
|
*/
|
||||||
static uint32_t
|
static uint32_t
|
||||||
sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, uint32_t offset,
|
sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa)
|
||||||
uint32_t length, struct sockaddr *sa)
|
|
||||||
{
|
{
|
||||||
struct sctp_paramhdr tmp_param, *ph;
|
struct sctp_paramhdr tmp_param, *ph;
|
||||||
uint16_t plen, ptype;
|
uint16_t plen, ptype;
|
||||||
@ -3155,8 +3153,7 @@ sctp_check_address_list_ep(struct sctp_tcb *stcb, struct mbuf *m, int offset,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* check to see if in the init-ack */
|
/* check to see if in the init-ack */
|
||||||
if (!sctp_addr_in_initack(stcb, m, offset, length,
|
if (!sctp_addr_in_initack(m, offset, length, &laddr->ifa->address.sa)) {
|
||||||
&laddr->ifa->address.sa)) {
|
|
||||||
/* try to add it */
|
/* try to add it */
|
||||||
sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb, laddr->ifa,
|
sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb, laddr->ifa,
|
||||||
SCTP_ADD_IP_ADDRESS, SCTP_ADDR_NOT_LOCKED);
|
SCTP_ADD_IP_ADDRESS, SCTP_ADDR_NOT_LOCKED);
|
||||||
@ -3179,6 +3176,15 @@ sctp_check_address_list_all(struct sctp_tcb *stcb, struct mbuf *m, int offset,
|
|||||||
struct sctp_ifa *sctp_ifa;
|
struct sctp_ifa *sctp_ifa;
|
||||||
uint32_t vrf_id;
|
uint32_t vrf_id;
|
||||||
|
|
||||||
|
#ifdef INET
|
||||||
|
struct sockaddr_in *sin;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#ifdef INET6
|
||||||
|
struct sockaddr_in6 *sin6;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
if (stcb) {
|
if (stcb) {
|
||||||
vrf_id = stcb->asoc.vrf_id;
|
vrf_id = stcb->asoc.vrf_id;
|
||||||
} else {
|
} else {
|
||||||
@ -3202,9 +3208,35 @@ sctp_check_address_list_all(struct sctp_tcb *stcb, struct mbuf *m, int offset,
|
|||||||
if (sctp_cmpaddr(&sctp_ifa->address.sa, init_addr)) {
|
if (sctp_cmpaddr(&sctp_ifa->address.sa, init_addr)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
switch (sctp_ifa->address.sa.sa_family) {
|
||||||
|
#ifdef INET
|
||||||
|
case AF_INET:
|
||||||
|
sin = (struct sockaddr_in *)&sctp_ifa->address.sin;
|
||||||
|
if ((ipv4_scope == 0) &&
|
||||||
|
(IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) {
|
||||||
|
/* private address not in scope */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef INET6
|
||||||
|
case AF_INET6:
|
||||||
|
sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sin6;
|
||||||
|
if ((local_scope == 0) &&
|
||||||
|
(IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ((site_scope == 0) &&
|
||||||
|
(IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
/* check to see if in the init-ack */
|
/* check to see if in the init-ack */
|
||||||
if (!sctp_addr_in_initack(stcb, m, offset, length,
|
if (!sctp_addr_in_initack(m, offset, length, &sctp_ifa->address.sa)) {
|
||||||
&sctp_ifa->address.sa)) {
|
|
||||||
/* try to add it */
|
/* try to add it */
|
||||||
sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb,
|
sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb,
|
||||||
sctp_ifa, SCTP_ADD_IP_ADDRESS,
|
sctp_ifa, SCTP_ADD_IP_ADDRESS,
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -1891,7 +1891,7 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication,
|
|||||||
|
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0, m_notify);
|
0, 0, stcb->asoc.context, 0, 0, 0, m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
sctp_m_freem(m_notify);
|
sctp_m_freem(m_notify);
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -83,11 +83,11 @@ sctp_wakeup_iterator(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_iterator_thread(void *v)
|
sctp_iterator_thread(void *v SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
SCTP_IPI_ITERATOR_WQ_LOCK();
|
SCTP_IPI_ITERATOR_WQ_LOCK();
|
||||||
/* In FreeBSD this thread never terminates. */
|
/* In FreeBSD this thread never terminates. */
|
||||||
while (1) {
|
for (;;) {
|
||||||
msleep(&sctp_it_ctl.iterator_running,
|
msleep(&sctp_it_ctl.iterator_running,
|
||||||
&sctp_it_ctl.ipi_iterator_wq_mtx,
|
&sctp_it_ctl.ipi_iterator_wq_mtx,
|
||||||
0, "waiting_for_work", 0);
|
0, "waiting_for_work", 0);
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -508,8 +508,7 @@ cc_bw_decrease(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint6
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw,
|
cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t vtag)
|
||||||
uint64_t vtag, uint8_t inst_ind)
|
|
||||||
{
|
{
|
||||||
uint64_t oth, probepoint;
|
uint64_t oth, probepoint;
|
||||||
|
|
||||||
@ -643,7 +642,7 @@ cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw)
|
|||||||
}
|
}
|
||||||
bw_offset = net->cc_mod.rtcc.lbw >> bw_shift;
|
bw_offset = net->cc_mod.rtcc.lbw >> bw_shift;
|
||||||
if (nbw > net->cc_mod.rtcc.lbw + bw_offset) {
|
if (nbw > net->cc_mod.rtcc.lbw + bw_offset) {
|
||||||
ret = cc_bw_increase(stcb, net, nbw, vtag, inst_ind);
|
ret = cc_bw_increase(stcb, net, nbw, vtag);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
rtt_offset = net->cc_mod.rtcc.lbw_rtt >> SCTP_BASE_SYSCTL(sctp_rttvar_rtt);
|
rtt_offset = net->cc_mod.rtcc.lbw_rtt >> SCTP_BASE_SYSCTL(sctp_rttvar_rtt);
|
||||||
@ -664,7 +663,7 @@ cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw)
|
|||||||
static void
|
static void
|
||||||
sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
|
sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
|
||||||
struct sctp_association *asoc,
|
struct sctp_association *asoc,
|
||||||
int accum_moved, int reneged_all, int will_exit, int use_rtcc)
|
int accum_moved, int reneged_all SCTP_UNUSED, int will_exit, int use_rtcc)
|
||||||
{
|
{
|
||||||
struct sctp_nets *net;
|
struct sctp_nets *net;
|
||||||
int old_cwnd;
|
int old_cwnd;
|
||||||
@ -1301,7 +1300,7 @@ sctp_cwnd_update_rtcc_tsn_acknowledged(struct sctp_nets *net,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_cwnd_prepare_rtcc_net_for_sack(struct sctp_tcb *stcb,
|
sctp_cwnd_prepare_rtcc_net_for_sack(struct sctp_tcb *stcb SCTP_UNUSED,
|
||||||
struct sctp_nets *net)
|
struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
if (net->cc_mod.rtcc.tls_needs_set > 0) {
|
if (net->cc_mod.rtcc.tls_needs_set > 0) {
|
||||||
@ -1473,7 +1472,7 @@ sctp_cwnd_rtcc_socket_option(struct sctp_tcb *stcb, int setorget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_cwnd_update_rtcc_packet_transmitted(struct sctp_tcb *stcb,
|
sctp_cwnd_update_rtcc_packet_transmitted(struct sctp_tcb *stcb SCTP_UNUSED,
|
||||||
struct sctp_nets *net)
|
struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
if (net->cc_mod.rtcc.tls_needs_set == 0) {
|
if (net->cc_mod.rtcc.tls_needs_set == 0) {
|
||||||
@ -1492,8 +1491,9 @@ sctp_cwnd_update_rtcc_after_sack(struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_rtt_rtcc_calculated(struct sctp_tcb *stcb,
|
sctp_rtt_rtcc_calculated(struct sctp_tcb *stcb SCTP_UNUSED,
|
||||||
struct sctp_nets *net, struct timeval *now)
|
struct sctp_nets *net,
|
||||||
|
struct timeval *now SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
net->cc_mod.rtcc.rtt_set_this_sack = 1;
|
net->cc_mod.rtcc.rtt_set_this_sack = 1;
|
||||||
}
|
}
|
||||||
@ -1731,7 +1731,7 @@ sctp_hs_cwnd_update_after_fr(struct sctp_tcb *stcb,
|
|||||||
static void
|
static void
|
||||||
sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
|
sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
|
||||||
struct sctp_association *asoc,
|
struct sctp_association *asoc,
|
||||||
int accum_moved, int reneged_all, int will_exit)
|
int accum_moved, int reneged_all SCTP_UNUSED, int will_exit)
|
||||||
{
|
{
|
||||||
struct sctp_nets *net;
|
struct sctp_nets *net;
|
||||||
|
|
||||||
@ -1879,7 +1879,7 @@ htcp_cwnd_undo(struct sctp_tcb *stcb, struct sctp_nets *net)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
measure_rtt(struct sctp_tcb *stcb, struct sctp_nets *net)
|
measure_rtt(struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
uint32_t srtt = net->lastsa >> SCTP_RTT_SHIFT;
|
uint32_t srtt = net->lastsa >> SCTP_RTT_SHIFT;
|
||||||
|
|
||||||
@ -1897,7 +1897,7 @@ measure_rtt(struct sctp_tcb *stcb, struct sctp_nets *net)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
measure_achieved_throughput(struct sctp_tcb *stcb, struct sctp_nets *net)
|
measure_achieved_throughput(struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
uint32_t now = sctp_get_tick_count();
|
uint32_t now = sctp_get_tick_count();
|
||||||
|
|
||||||
@ -1997,7 +1997,7 @@ htcp_alpha_update(struct htcp *ca)
|
|||||||
* were getting just too full now).
|
* were getting just too full now).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
htcp_param_update(struct sctp_tcb *stcb, struct sctp_nets *net)
|
htcp_param_update(struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
uint32_t minRTT = net->cc_mod.htcp_ca.minRTT;
|
uint32_t minRTT = net->cc_mod.htcp_ca.minRTT;
|
||||||
uint32_t maxRTT = net->cc_mod.htcp_ca.maxRTT;
|
uint32_t maxRTT = net->cc_mod.htcp_ca.maxRTT;
|
||||||
@ -2014,9 +2014,9 @@ htcp_param_update(struct sctp_tcb *stcb, struct sctp_nets *net)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
static uint32_t
|
||||||
htcp_recalc_ssthresh(struct sctp_tcb *stcb, struct sctp_nets *net)
|
htcp_recalc_ssthresh(struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
htcp_param_update(stcb, net);
|
htcp_param_update(net);
|
||||||
return max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu);
|
return max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2051,7 +2051,7 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_nets *net)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
measure_rtt(stcb, net);
|
measure_rtt(net);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In dangerous area, increase slowly. In theory this is
|
* In dangerous area, increase slowly. In theory this is
|
||||||
@ -2093,7 +2093,7 @@ htcp_min_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
htcp_init(struct sctp_tcb *stcb, struct sctp_nets *net)
|
htcp_init(struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
memset(&net->cc_mod.htcp_ca, 0, sizeof(struct htcp));
|
memset(&net->cc_mod.htcp_ca, 0, sizeof(struct htcp));
|
||||||
net->cc_mod.htcp_ca.alpha = ALPHA_BASE;
|
net->cc_mod.htcp_ca.alpha = ALPHA_BASE;
|
||||||
@ -2111,7 +2111,7 @@ sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net)
|
|||||||
*/
|
*/
|
||||||
net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
|
net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
|
||||||
net->ssthresh = stcb->asoc.peers_rwnd;
|
net->ssthresh = stcb->asoc.peers_rwnd;
|
||||||
htcp_init(stcb, net);
|
htcp_init(net);
|
||||||
|
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) {
|
||||||
sctp_log_cwnd(stcb, net, 0, SCTP_CWND_INITIALIZATION);
|
sctp_log_cwnd(stcb, net, 0, SCTP_CWND_INITIALIZATION);
|
||||||
@ -2121,7 +2121,7 @@ sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net)
|
|||||||
static void
|
static void
|
||||||
sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
|
sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
|
||||||
struct sctp_association *asoc,
|
struct sctp_association *asoc,
|
||||||
int accum_moved, int reneged_all, int will_exit)
|
int accum_moved, int reneged_all SCTP_UNUSED, int will_exit)
|
||||||
{
|
{
|
||||||
struct sctp_nets *net;
|
struct sctp_nets *net;
|
||||||
|
|
||||||
@ -2176,7 +2176,7 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
|
|||||||
if (accum_moved ||
|
if (accum_moved ||
|
||||||
((asoc->sctp_cmt_on_off > 0) && net->new_pseudo_cumack)) {
|
((asoc->sctp_cmt_on_off > 0) && net->new_pseudo_cumack)) {
|
||||||
htcp_cong_avoid(stcb, net);
|
htcp_cong_avoid(stcb, net);
|
||||||
measure_achieved_throughput(stcb, net);
|
measure_achieved_throughput(net);
|
||||||
} else {
|
} else {
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) {
|
||||||
sctp_log_cwnd(stcb, net, net->mtu,
|
sctp_log_cwnd(stcb, net, net->mtu,
|
||||||
@ -2212,7 +2212,7 @@ sctp_htcp_cwnd_update_after_fr(struct sctp_tcb *stcb,
|
|||||||
|
|
||||||
/* JRS - reset as if state were changed */
|
/* JRS - reset as if state were changed */
|
||||||
htcp_reset(&net->cc_mod.htcp_ca);
|
htcp_reset(&net->cc_mod.htcp_ca);
|
||||||
net->ssthresh = htcp_recalc_ssthresh(stcb, net);
|
net->ssthresh = htcp_recalc_ssthresh(net);
|
||||||
net->cwnd = net->ssthresh;
|
net->cwnd = net->ssthresh;
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
|
||||||
sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd),
|
sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd),
|
||||||
@ -2266,7 +2266,7 @@ sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb,
|
|||||||
|
|
||||||
/* JRS - reset as if the state were being changed to timeout */
|
/* JRS - reset as if the state were being changed to timeout */
|
||||||
htcp_reset(&net->cc_mod.htcp_ca);
|
htcp_reset(&net->cc_mod.htcp_ca);
|
||||||
net->ssthresh = htcp_recalc_ssthresh(stcb, net);
|
net->ssthresh = htcp_recalc_ssthresh(net);
|
||||||
net->cwnd = net->mtu;
|
net->cwnd = net->mtu;
|
||||||
net->partial_bytes_acked = 0;
|
net->partial_bytes_acked = 0;
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
|
||||||
@ -2276,7 +2276,7 @@ sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
|
sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
|
||||||
struct sctp_nets *net, int in_window, int num_pkt_lost)
|
struct sctp_nets *net, int in_window, int num_pkt_lost SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
int old_cwnd;
|
int old_cwnd;
|
||||||
|
|
||||||
@ -2286,7 +2286,7 @@ sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
|
|||||||
if (in_window == 0) {
|
if (in_window == 0) {
|
||||||
htcp_reset(&net->cc_mod.htcp_ca);
|
htcp_reset(&net->cc_mod.htcp_ca);
|
||||||
SCTP_STAT_INCR(sctps_ecnereducedcwnd);
|
SCTP_STAT_INCR(sctps_ecnereducedcwnd);
|
||||||
net->ssthresh = htcp_recalc_ssthresh(stcb, net);
|
net->ssthresh = htcp_recalc_ssthresh(net);
|
||||||
if (net->ssthresh < net->mtu) {
|
if (net->ssthresh < net->mtu) {
|
||||||
net->ssthresh = net->mtu;
|
net->ssthresh = net->mtu;
|
||||||
/* here back off the timer as well, to slow us down */
|
/* here back off the timer as well, to slow us down */
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -1017,20 +1017,9 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
|
|
||||||
#if defined(_KERNEL)
|
#if defined(_KERNEL)
|
||||||
|
#define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x))
|
||||||
#define SCTP_GETTIME_TIMESPEC(x) (getnanouptime(x))
|
#define SCTP_GETPTIME_TIMEVAL(x) (microuptime(x))
|
||||||
#define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x))
|
|
||||||
#define SCTP_GETPTIME_TIMEVAL(x) (microuptime(x))
|
|
||||||
#endif
|
#endif
|
||||||
/*#if defined(__FreeBSD__) || defined(__APPLE__)*/
|
|
||||||
/*#define SCTP_GETTIME_TIMEVAL(x) { \*/
|
|
||||||
/* (x)->tv_sec = ticks / 1000; \*/
|
|
||||||
/* (x)->tv_usec = (ticks % 1000) * 1000; \*/
|
|
||||||
/*}*/
|
|
||||||
|
|
||||||
/*#else*/
|
|
||||||
/*#define SCTP_GETTIME_TIMEVAL(x) (microtime(x))*/
|
|
||||||
/*#endif __FreeBSD__ */
|
|
||||||
|
|
||||||
#if defined(_KERNEL) || defined(__Userspace__)
|
#if defined(_KERNEL) || defined(__Userspace__)
|
||||||
#define sctp_sowwakeup(inp, so) \
|
#define sctp_sowwakeup(inp, so) \
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -137,7 +137,7 @@ sctp_build_readq_entry(struct sctp_tcb *stcb,
|
|||||||
read_queue_e->sinfo_ssn = stream_seq;
|
read_queue_e->sinfo_ssn = stream_seq;
|
||||||
read_queue_e->sinfo_flags = (flags << 8);
|
read_queue_e->sinfo_flags = (flags << 8);
|
||||||
read_queue_e->sinfo_ppid = ppid;
|
read_queue_e->sinfo_ppid = ppid;
|
||||||
read_queue_e->sinfo_context = stcb->asoc.context;
|
read_queue_e->sinfo_context = context;
|
||||||
read_queue_e->sinfo_timetolive = 0;
|
read_queue_e->sinfo_timetolive = 0;
|
||||||
read_queue_e->sinfo_tsn = tsn;
|
read_queue_e->sinfo_tsn = tsn;
|
||||||
read_queue_e->sinfo_cumtsn = tsn;
|
read_queue_e->sinfo_cumtsn = tsn;
|
||||||
@ -846,7 +846,6 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
{
|
{
|
||||||
struct mbuf *oper;
|
struct mbuf *oper;
|
||||||
uint32_t cum_ackp1, last_tsn, prev_tsn, post_tsn;
|
uint32_t cum_ackp1, last_tsn, prev_tsn, post_tsn;
|
||||||
u_char last_flags;
|
|
||||||
struct sctp_tmit_chunk *at, *prev, *next;
|
struct sctp_tmit_chunk *at, *prev, *next;
|
||||||
|
|
||||||
prev = next = NULL;
|
prev = next = NULL;
|
||||||
@ -1033,7 +1032,6 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
|
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
last_flags = at->rec.data.rcv_flags;
|
|
||||||
last_tsn = at->rec.data.TSN_seq;
|
last_tsn = at->rec.data.TSN_seq;
|
||||||
prev = at;
|
prev = at;
|
||||||
if (TAILQ_NEXT(at, sctp_next) == NULL) {
|
if (TAILQ_NEXT(at, sctp_next) == NULL) {
|
||||||
@ -1455,7 +1453,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
struct sctp_tmit_chunk *chk;
|
struct sctp_tmit_chunk *chk;
|
||||||
uint32_t tsn, gap;
|
uint32_t tsn, gap;
|
||||||
struct mbuf *dmbuf;
|
struct mbuf *dmbuf;
|
||||||
int indx, the_len;
|
int the_len;
|
||||||
int need_reasm_check = 0;
|
int need_reasm_check = 0;
|
||||||
uint16_t strmno, strmseq;
|
uint16_t strmno, strmseq;
|
||||||
struct mbuf *oper;
|
struct mbuf *oper;
|
||||||
@ -1587,7 +1585,6 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
} else {
|
} else {
|
||||||
SCTP_STAT_INCR(sctps_datadroprwnd);
|
SCTP_STAT_INCR(sctps_datadroprwnd);
|
||||||
}
|
}
|
||||||
indx = *break_flag;
|
|
||||||
*break_flag = 1;
|
*break_flag = 1;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -2259,7 +2256,6 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
|
|||||||
uint32_t old_cumack, old_base, old_highest, highest_tsn;
|
uint32_t old_cumack, old_base, old_highest, highest_tsn;
|
||||||
|
|
||||||
asoc = &stcb->asoc;
|
asoc = &stcb->asoc;
|
||||||
at = 0;
|
|
||||||
|
|
||||||
old_cumack = asoc->cumulative_tsn;
|
old_cumack = asoc->cumulative_tsn;
|
||||||
old_base = asoc->mapping_array_base_tsn;
|
old_base = asoc->mapping_array_base_tsn;
|
||||||
@ -2408,7 +2404,7 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap, int *abort_flag)
|
sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap)
|
||||||
{
|
{
|
||||||
struct sctp_association *asoc;
|
struct sctp_association *asoc;
|
||||||
uint32_t highest_tsn;
|
uint32_t highest_tsn;
|
||||||
@ -2824,10 +2820,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
|
|||||||
stcb->asoc.send_sack = 1;
|
stcb->asoc.send_sack = 1;
|
||||||
}
|
}
|
||||||
/* Start a sack timer or QUEUE a SACK for sending */
|
/* Start a sack timer or QUEUE a SACK for sending */
|
||||||
sctp_sack_check(stcb, was_a_gap, &abort_flag);
|
sctp_sack_check(stcb, was_a_gap);
|
||||||
if (abort_flag)
|
|
||||||
return (2);
|
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2837,7 +2830,7 @@ sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1
|
|||||||
int *num_frs,
|
int *num_frs,
|
||||||
uint32_t * biggest_newly_acked_tsn,
|
uint32_t * biggest_newly_acked_tsn,
|
||||||
uint32_t * this_sack_lowest_newack,
|
uint32_t * this_sack_lowest_newack,
|
||||||
int *ecn_seg_sums, int *rto_ok)
|
int *rto_ok)
|
||||||
{
|
{
|
||||||
struct sctp_tmit_chunk *tp1;
|
struct sctp_tmit_chunk *tp1;
|
||||||
unsigned int theTSN;
|
unsigned int theTSN;
|
||||||
@ -3059,8 +3052,7 @@ static int
|
|||||||
sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
uint32_t last_tsn, uint32_t * biggest_tsn_acked,
|
uint32_t last_tsn, uint32_t * biggest_tsn_acked,
|
||||||
uint32_t * biggest_newly_acked_tsn, uint32_t * this_sack_lowest_newack,
|
uint32_t * biggest_newly_acked_tsn, uint32_t * this_sack_lowest_newack,
|
||||||
int num_seg, int num_nr_seg, int *ecn_seg_sums,
|
int num_seg, int num_nr_seg, int *rto_ok)
|
||||||
int *rto_ok)
|
|
||||||
{
|
{
|
||||||
struct sctp_gap_ack_block *frag, block;
|
struct sctp_gap_ack_block *frag, block;
|
||||||
struct sctp_tmit_chunk *tp1;
|
struct sctp_tmit_chunk *tp1;
|
||||||
@ -3106,7 +3098,7 @@ sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct
|
|||||||
}
|
}
|
||||||
if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end,
|
if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end,
|
||||||
non_revocable, &num_frs, biggest_newly_acked_tsn,
|
non_revocable, &num_frs, biggest_newly_acked_tsn,
|
||||||
this_sack_lowest_newack, ecn_seg_sums, rto_ok)) {
|
this_sack_lowest_newack, rto_ok)) {
|
||||||
chunk_freed = 1;
|
chunk_freed = 1;
|
||||||
}
|
}
|
||||||
prev_frag_end = frag_end;
|
prev_frag_end = frag_end;
|
||||||
@ -3761,7 +3753,6 @@ sctp_fs_audit(struct sctp_association *asoc)
|
|||||||
static void
|
static void
|
||||||
sctp_window_probe_recovery(struct sctp_tcb *stcb,
|
sctp_window_probe_recovery(struct sctp_tcb *stcb,
|
||||||
struct sctp_association *asoc,
|
struct sctp_association *asoc,
|
||||||
struct sctp_nets *net,
|
|
||||||
struct sctp_tmit_chunk *tp1)
|
struct sctp_tmit_chunk *tp1)
|
||||||
{
|
{
|
||||||
tp1->window_probe = 0;
|
tp1->window_probe = 0;
|
||||||
@ -4029,7 +4020,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
|
|||||||
SOCKBUF_LOCK(&stcb->sctp_socket->so_snd);
|
SOCKBUF_LOCK(&stcb->sctp_socket->so_snd);
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
|
||||||
/* sa_ignore NO_NULL_CHK */
|
/* sa_ignore NO_NULL_CHK */
|
||||||
sctp_wakeup_log(stcb, cumack, 1, SCTP_WAKESND_FROM_SACK);
|
sctp_wakeup_log(stcb, 1, SCTP_WAKESND_FROM_SACK);
|
||||||
}
|
}
|
||||||
#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
|
#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
|
||||||
so = SCTP_INP_SO(stcb->sctp_ep);
|
so = SCTP_INP_SO(stcb->sctp_ep);
|
||||||
@ -4050,7 +4041,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
|
||||||
sctp_wakeup_log(stcb, cumack, 1, SCTP_NOWAKE_FROM_SACK);
|
sctp_wakeup_log(stcb, 1, SCTP_NOWAKE_FROM_SACK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4136,7 +4127,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
|
|||||||
TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
|
TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
|
||||||
if (tp1->window_probe) {
|
if (tp1->window_probe) {
|
||||||
/* move back to data send queue */
|
/* move back to data send queue */
|
||||||
sctp_window_probe_recovery(stcb, asoc, net, tp1);
|
sctp_window_probe_recovery(stcb, asoc, tp1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4344,7 +4335,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
|
|||||||
|
|
||||||
void
|
void
|
||||||
sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
||||||
struct sctp_tcb *stcb, struct sctp_nets *net_from,
|
struct sctp_tcb *stcb,
|
||||||
uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup,
|
uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup,
|
||||||
int *abort_now, uint8_t flags,
|
int *abort_now, uint8_t flags,
|
||||||
uint32_t cum_ack, uint32_t rwnd, int ecne_seen)
|
uint32_t cum_ack, uint32_t rwnd, int ecne_seen)
|
||||||
@ -4352,7 +4343,6 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
struct sctp_association *asoc;
|
struct sctp_association *asoc;
|
||||||
struct sctp_tmit_chunk *tp1, *tp2;
|
struct sctp_tmit_chunk *tp1, *tp2;
|
||||||
uint32_t last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack;
|
uint32_t last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack;
|
||||||
uint32_t sav_cum_ack;
|
|
||||||
uint16_t wake_him = 0;
|
uint16_t wake_him = 0;
|
||||||
uint32_t send_s = 0;
|
uint32_t send_s = 0;
|
||||||
long j;
|
long j;
|
||||||
@ -4362,7 +4352,6 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
int win_probe_recovery = 0;
|
int win_probe_recovery = 0;
|
||||||
int win_probe_recovered = 0;
|
int win_probe_recovered = 0;
|
||||||
struct sctp_nets *net = NULL;
|
struct sctp_nets *net = NULL;
|
||||||
int ecn_seg_sums = 0;
|
|
||||||
int done_once;
|
int done_once;
|
||||||
int rto_ok = 1;
|
int rto_ok = 1;
|
||||||
uint8_t reneged_all = 0;
|
uint8_t reneged_all = 0;
|
||||||
@ -4392,7 +4381,6 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
SCTP_TCB_LOCK_ASSERT(stcb);
|
SCTP_TCB_LOCK_ASSERT(stcb);
|
||||||
/* CMT DAC algo */
|
/* CMT DAC algo */
|
||||||
this_sack_lowest_newack = 0;
|
this_sack_lowest_newack = 0;
|
||||||
j = 0;
|
|
||||||
SCTP_STAT_INCR(sctps_slowpath_sack);
|
SCTP_STAT_INCR(sctps_slowpath_sack);
|
||||||
last_tsn = cum_ack;
|
last_tsn = cum_ack;
|
||||||
cmt_dac_flag = flags & SCTP_SACK_CMT_DAC;
|
cmt_dac_flag = flags & SCTP_SACK_CMT_DAC;
|
||||||
@ -4492,8 +4480,6 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
/* acking something behind */
|
/* acking something behind */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sav_cum_ack = asoc->last_acked_seq;
|
|
||||||
|
|
||||||
/* update the Rwnd of the peer */
|
/* update the Rwnd of the peer */
|
||||||
if (TAILQ_EMPTY(&asoc->sent_queue) &&
|
if (TAILQ_EMPTY(&asoc->sent_queue) &&
|
||||||
TAILQ_EMPTY(&asoc->send_queue) &&
|
TAILQ_EMPTY(&asoc->send_queue) &&
|
||||||
@ -4690,8 +4676,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
*/
|
*/
|
||||||
if (sctp_handle_segments(m, &offset_seg, stcb, asoc, last_tsn, &biggest_tsn_acked,
|
if (sctp_handle_segments(m, &offset_seg, stcb, asoc, last_tsn, &biggest_tsn_acked,
|
||||||
&biggest_tsn_newly_acked, &this_sack_lowest_newack,
|
&biggest_tsn_newly_acked, &this_sack_lowest_newack,
|
||||||
num_seg, num_nr_seg, &ecn_seg_sums,
|
num_seg, num_nr_seg, &rto_ok)) {
|
||||||
&rto_ok)) {
|
|
||||||
wake_him++;
|
wake_him++;
|
||||||
}
|
}
|
||||||
if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) {
|
if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) {
|
||||||
@ -4788,7 +4773,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
#endif
|
#endif
|
||||||
SOCKBUF_LOCK(&stcb->sctp_socket->so_snd);
|
SOCKBUF_LOCK(&stcb->sctp_socket->so_snd);
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
|
||||||
sctp_wakeup_log(stcb, cum_ack, wake_him, SCTP_WAKESND_FROM_SACK);
|
sctp_wakeup_log(stcb, wake_him, SCTP_WAKESND_FROM_SACK);
|
||||||
}
|
}
|
||||||
#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
|
#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
|
||||||
so = SCTP_INP_SO(stcb->sctp_ep);
|
so = SCTP_INP_SO(stcb->sctp_ep);
|
||||||
@ -4809,7 +4794,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
|
||||||
sctp_wakeup_log(stcb, cum_ack, wake_him, SCTP_NOWAKE_FROM_SACK);
|
sctp_wakeup_log(stcb, wake_him, SCTP_NOWAKE_FROM_SACK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5112,7 +5097,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
*/
|
*/
|
||||||
TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
|
TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
|
||||||
if (tp1->window_probe) {
|
if (tp1->window_probe) {
|
||||||
sctp_window_probe_recovery(stcb, asoc, net, tp1);
|
sctp_window_probe_recovery(stcb, asoc, tp1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5222,8 +5207,7 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_update_acked(struct sctp_tcb *stcb, struct sctp_shutdown_chunk *cp,
|
sctp_update_acked(struct sctp_tcb *stcb, struct sctp_shutdown_chunk *cp, int *abort_flag)
|
||||||
struct sctp_nets *netp, int *abort_flag)
|
|
||||||
{
|
{
|
||||||
/* Copy cum-ack */
|
/* Copy cum-ack */
|
||||||
uint32_t cum_ack, a_rwnd;
|
uint32_t cum_ack, a_rwnd;
|
||||||
@ -5389,13 +5373,12 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb,
|
|||||||
*/
|
*/
|
||||||
struct sctp_association *asoc;
|
struct sctp_association *asoc;
|
||||||
uint32_t new_cum_tsn, gap;
|
uint32_t new_cum_tsn, gap;
|
||||||
unsigned int i, fwd_sz, cumack_set_flag, m_size;
|
unsigned int i, fwd_sz, m_size;
|
||||||
uint32_t str_seq;
|
uint32_t str_seq;
|
||||||
struct sctp_stream_in *strm;
|
struct sctp_stream_in *strm;
|
||||||
struct sctp_tmit_chunk *chk, *nchk;
|
struct sctp_tmit_chunk *chk, *nchk;
|
||||||
struct sctp_queued_to_read *ctl, *sv;
|
struct sctp_queued_to_read *ctl, *sv;
|
||||||
|
|
||||||
cumack_set_flag = 0;
|
|
||||||
asoc = &stcb->asoc;
|
asoc = &stcb->asoc;
|
||||||
if ((fwd_sz = ntohs(fwd->ch.chunk_length)) < sizeof(struct sctp_forward_tsn_chunk)) {
|
if ((fwd_sz = ntohs(fwd->ch.chunk_length)) < sizeof(struct sctp_forward_tsn_chunk)) {
|
||||||
SCTPDBG(SCTP_DEBUG_INDATA1,
|
SCTPDBG(SCTP_DEBUG_INDATA1,
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -94,7 +94,7 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
|
|||||||
|
|
||||||
void
|
void
|
||||||
sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
|
||||||
struct sctp_tcb *stcb, struct sctp_nets *net_from,
|
struct sctp_tcb *stcb,
|
||||||
uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup,
|
uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup,
|
||||||
int *abort_now, uint8_t flags,
|
int *abort_now, uint8_t flags,
|
||||||
uint32_t cum_ack, uint32_t rwnd, int ecne_seen);
|
uint32_t cum_ack, uint32_t rwnd, int ecne_seen);
|
||||||
@ -110,8 +110,7 @@ struct sctp_tmit_chunk *
|
|||||||
void sctp_service_queues(struct sctp_tcb *, struct sctp_association *);
|
void sctp_service_queues(struct sctp_tcb *, struct sctp_association *);
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_update_acked(struct sctp_tcb *, struct sctp_shutdown_chunk *,
|
sctp_update_acked(struct sctp_tcb *, struct sctp_shutdown_chunk *, int *);
|
||||||
struct sctp_nets *, int *);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
sctp_process_data(struct mbuf **, int, int *, int, struct sctphdr *,
|
sctp_process_data(struct mbuf **, int, int *, int, struct sctphdr *,
|
||||||
@ -120,7 +119,7 @@ sctp_process_data(struct mbuf **, int, int *, int, struct sctphdr *,
|
|||||||
|
|
||||||
void sctp_slide_mapping_arrays(struct sctp_tcb *stcb);
|
void sctp_slide_mapping_arrays(struct sctp_tcb *stcb);
|
||||||
|
|
||||||
void sctp_sack_check(struct sctp_tcb *, int, int *);
|
void sctp_sack_check(struct sctp_tcb *, int);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -84,7 +84,7 @@ sctp_stop_all_cookie_timers(struct sctp_tcb *stcb)
|
|||||||
static void
|
static void
|
||||||
sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
|
sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
|
||||||
struct sctp_init_chunk *cp, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
struct sctp_init_chunk *cp, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||||
struct sctp_nets *net, int *abort_no_unlock, uint32_t vrf_id, uint16_t port)
|
int *abort_no_unlock, uint32_t vrf_id, uint16_t port)
|
||||||
{
|
{
|
||||||
struct sctp_init *init;
|
struct sctp_init *init;
|
||||||
struct mbuf *op_err;
|
struct mbuf *op_err;
|
||||||
@ -258,8 +258,7 @@ sctp_is_there_unsent_data(struct sctp_tcb *stcb, int so_locked
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb,
|
sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb)
|
||||||
struct sctp_nets *net)
|
|
||||||
{
|
{
|
||||||
struct sctp_init *init;
|
struct sctp_init *init;
|
||||||
struct sctp_association *asoc;
|
struct sctp_association *asoc;
|
||||||
@ -433,13 +432,13 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset,
|
|||||||
asoc = &stcb->asoc;
|
asoc = &stcb->asoc;
|
||||||
asoc->peer_supports_nat = (uint8_t) nat_friendly;
|
asoc->peer_supports_nat = (uint8_t) nat_friendly;
|
||||||
/* process the peer's parameters in the INIT-ACK */
|
/* process the peer's parameters in the INIT-ACK */
|
||||||
retval = sctp_process_init((struct sctp_init_chunk *)cp, stcb, net);
|
retval = sctp_process_init((struct sctp_init_chunk *)cp, stcb);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
return (retval);
|
return (retval);
|
||||||
}
|
}
|
||||||
initack_limit = offset + ntohs(cp->ch.chunk_length);
|
initack_limit = offset + ntohs(cp->ch.chunk_length);
|
||||||
/* load all addresses */
|
/* load all addresses */
|
||||||
if ((retval = sctp_load_addresses_from_init(stcb, m, iphlen,
|
if ((retval = sctp_load_addresses_from_init(stcb, m,
|
||||||
(offset + sizeof(struct sctp_init_chunk)), initack_limit, sh,
|
(offset + sizeof(struct sctp_init_chunk)), initack_limit, sh,
|
||||||
NULL))) {
|
NULL))) {
|
||||||
/* Huh, we should abort */
|
/* Huh, we should abort */
|
||||||
@ -521,7 +520,7 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset,
|
|||||||
mp->resv = 0;
|
mp->resv = 0;
|
||||||
}
|
}
|
||||||
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
|
sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
|
||||||
sh, op_err, 0, net->port);
|
sh, op_err, vrf_id, net->port);
|
||||||
*abort_no_unlock = 1;
|
*abort_no_unlock = 1;
|
||||||
}
|
}
|
||||||
return (retval);
|
return (retval);
|
||||||
@ -871,7 +870,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
|
|||||||
/* Shutdown NOT the expected size */
|
/* Shutdown NOT the expected size */
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
sctp_update_acked(stcb, cp, net, abort_flag);
|
sctp_update_acked(stcb, cp, abort_flag);
|
||||||
if (*abort_flag) {
|
if (*abort_flag) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -953,7 +952,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp,
|
sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED,
|
||||||
struct sctp_tcb *stcb,
|
struct sctp_tcb *stcb,
|
||||||
struct sctp_nets *net)
|
struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
@ -1410,7 +1409,7 @@ static struct sctp_tcb *
|
|||||||
sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
||||||
struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len,
|
struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len,
|
||||||
struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp,
|
struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp,
|
||||||
struct sockaddr *init_src, int *notification, sctp_assoc_t * sac_assoc_id,
|
struct sockaddr *init_src, int *notification,
|
||||||
uint32_t vrf_id, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, uint16_t port)
|
uint32_t vrf_id, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, uint16_t port)
|
||||||
{
|
{
|
||||||
struct sctp_association *asoc;
|
struct sctp_association *asoc;
|
||||||
@ -1526,7 +1525,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
|||||||
* the right seq no's.
|
* the right seq no's.
|
||||||
*/
|
*/
|
||||||
/* First we must process the INIT !! */
|
/* First we must process the INIT !! */
|
||||||
retval = sctp_process_init(init_cp, stcb, net);
|
retval = sctp_process_init(init_cp, stcb);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
if (how_indx < sizeof(asoc->cookie_how))
|
if (how_indx < sizeof(asoc->cookie_how))
|
||||||
asoc->cookie_how[how_indx] = 3;
|
asoc->cookie_how[how_indx] = 3;
|
||||||
@ -1613,7 +1612,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
|||||||
* somehow abort.. but we do have an existing asoc. This
|
* somehow abort.. but we do have an existing asoc. This
|
||||||
* really should not fail.
|
* really should not fail.
|
||||||
*/
|
*/
|
||||||
if (sctp_load_addresses_from_init(stcb, m, iphlen,
|
if (sctp_load_addresses_from_init(stcb, m,
|
||||||
init_offset + sizeof(struct sctp_init_chunk),
|
init_offset + sizeof(struct sctp_init_chunk),
|
||||||
initack_offset, sh, init_src)) {
|
initack_offset, sh, init_src)) {
|
||||||
if (how_indx < sizeof(asoc->cookie_how))
|
if (how_indx < sizeof(asoc->cookie_how))
|
||||||
@ -1749,13 +1748,13 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
|||||||
|
|
||||||
}
|
}
|
||||||
/* process the INIT info (peer's info) */
|
/* process the INIT info (peer's info) */
|
||||||
retval = sctp_process_init(init_cp, stcb, net);
|
retval = sctp_process_init(init_cp, stcb);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
if (how_indx < sizeof(asoc->cookie_how))
|
if (how_indx < sizeof(asoc->cookie_how))
|
||||||
asoc->cookie_how[how_indx] = 9;
|
asoc->cookie_how[how_indx] = 9;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
if (sctp_load_addresses_from_init(stcb, m, iphlen,
|
if (sctp_load_addresses_from_init(stcb, m,
|
||||||
init_offset + sizeof(struct sctp_init_chunk),
|
init_offset + sizeof(struct sctp_init_chunk),
|
||||||
initack_offset, sh, init_src)) {
|
initack_offset, sh, init_src)) {
|
||||||
if (how_indx < sizeof(asoc->cookie_how))
|
if (how_indx < sizeof(asoc->cookie_how))
|
||||||
@ -1852,7 +1851,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
|||||||
sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_15);
|
sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_15);
|
||||||
sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16);
|
sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16);
|
||||||
|
|
||||||
*sac_assoc_id = sctp_get_associd(stcb);
|
|
||||||
/* notify upper layer */
|
/* notify upper layer */
|
||||||
*notification = SCTP_NOTIFY_ASSOC_RESTART;
|
*notification = SCTP_NOTIFY_ASSOC_RESTART;
|
||||||
atomic_add_int(&stcb->asoc.refcnt, 1);
|
atomic_add_int(&stcb->asoc.refcnt, 1);
|
||||||
@ -1928,7 +1926,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
|||||||
SCTP_INP_WUNLOCK(stcb->sctp_ep);
|
SCTP_INP_WUNLOCK(stcb->sctp_ep);
|
||||||
SCTP_INP_INFO_WUNLOCK();
|
SCTP_INP_INFO_WUNLOCK();
|
||||||
|
|
||||||
retval = sctp_process_init(init_cp, stcb, net);
|
retval = sctp_process_init(init_cp, stcb);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
if (how_indx < sizeof(asoc->cookie_how))
|
if (how_indx < sizeof(asoc->cookie_how))
|
||||||
asoc->cookie_how[how_indx] = 13;
|
asoc->cookie_how[how_indx] = 13;
|
||||||
@ -1941,7 +1939,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
|||||||
*/
|
*/
|
||||||
net->hb_responded = 1;
|
net->hb_responded = 1;
|
||||||
|
|
||||||
if (sctp_load_addresses_from_init(stcb, m, iphlen,
|
if (sctp_load_addresses_from_init(stcb, m,
|
||||||
init_offset + sizeof(struct sctp_init_chunk),
|
init_offset + sizeof(struct sctp_init_chunk),
|
||||||
initack_offset, sh, init_src)) {
|
initack_offset, sh, init_src)) {
|
||||||
if (how_indx < sizeof(asoc->cookie_how))
|
if (how_indx < sizeof(asoc->cookie_how))
|
||||||
@ -2131,7 +2129,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
|
|||||||
|
|
||||||
/* process the INIT info (peer's info) */
|
/* process the INIT info (peer's info) */
|
||||||
if (netp)
|
if (netp)
|
||||||
retval = sctp_process_init(init_cp, stcb, *netp);
|
retval = sctp_process_init(init_cp, stcb);
|
||||||
else
|
else
|
||||||
retval = 0;
|
retval = 0;
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
@ -2149,7 +2147,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
/* load all addresses */
|
/* load all addresses */
|
||||||
if (sctp_load_addresses_from_init(stcb, m, iphlen,
|
if (sctp_load_addresses_from_init(stcb, m,
|
||||||
init_offset + sizeof(struct sctp_init_chunk), initack_offset, sh,
|
init_offset + sizeof(struct sctp_init_chunk), initack_offset, sh,
|
||||||
init_src)) {
|
init_src)) {
|
||||||
atomic_add_int(&stcb->asoc.refcnt, 1);
|
atomic_add_int(&stcb->asoc.refcnt, 1);
|
||||||
@ -2356,7 +2354,6 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
|||||||
struct sctp_tcb *l_stcb = *stcb;
|
struct sctp_tcb *l_stcb = *stcb;
|
||||||
struct sctp_inpcb *l_inp;
|
struct sctp_inpcb *l_inp;
|
||||||
struct sockaddr *to;
|
struct sockaddr *to;
|
||||||
sctp_assoc_t sac_restart_id;
|
|
||||||
struct sctp_pcb *ep;
|
struct sctp_pcb *ep;
|
||||||
struct mbuf *m_sig;
|
struct mbuf *m_sig;
|
||||||
uint8_t calc_sig[SCTP_SIGNATURE_SIZE], tmp_sig[SCTP_SIGNATURE_SIZE];
|
uint8_t calc_sig[SCTP_SIGNATURE_SIZE], tmp_sig[SCTP_SIGNATURE_SIZE];
|
||||||
@ -2682,7 +2679,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
|||||||
had_a_existing_tcb = 1;
|
had_a_existing_tcb = 1;
|
||||||
*stcb = sctp_process_cookie_existing(m, iphlen, offset, sh,
|
*stcb = sctp_process_cookie_existing(m, iphlen, offset, sh,
|
||||||
cookie, cookie_len, *inp_p, *stcb, netp, to,
|
cookie, cookie_len, *inp_p, *stcb, netp, to,
|
||||||
¬ification, &sac_restart_id, vrf_id, auth_skipped, auth_offset, auth_len, port);
|
¬ification, vrf_id, auth_skipped, auth_offset, auth_len, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*stcb == NULL) {
|
if (*stcb == NULL) {
|
||||||
@ -2736,7 +2733,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
|||||||
* For a restart we will keep the same
|
* For a restart we will keep the same
|
||||||
* socket, no need to do anything. I THINK!!
|
* socket, no need to do anything. I THINK!!
|
||||||
*/
|
*/
|
||||||
sctp_ulp_notify(notification, *stcb, 0, (void *)&sac_restart_id, SCTP_SO_NOT_LOCKED);
|
sctp_ulp_notify(notification, *stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
|
||||||
if (send_int_conf) {
|
if (send_int_conf) {
|
||||||
sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED,
|
sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED,
|
||||||
(*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED);
|
(*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED);
|
||||||
@ -2890,7 +2887,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp,
|
sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED,
|
||||||
struct sctp_tcb *stcb, struct sctp_nets *net)
|
struct sctp_tcb *stcb, struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
/* cp must not be used, others call this without a c-ack :-) */
|
/* cp must not be used, others call this without a c-ack :-) */
|
||||||
@ -3160,7 +3157,7 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chunk *cp, struct sctp_tcb *stcb, struct sct
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp,
|
sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp SCTP_UNUSED,
|
||||||
struct sctp_tcb *stcb, struct sctp_nets *net)
|
struct sctp_tcb *stcb, struct sctp_nets *net)
|
||||||
{
|
{
|
||||||
struct sctp_association *asoc;
|
struct sctp_association *asoc;
|
||||||
@ -4401,7 +4398,7 @@ __attribute__((noinline))
|
|||||||
asconf_len = ntohs(asconf_ch->chunk_length);
|
asconf_len = ntohs(asconf_ch->chunk_length);
|
||||||
if (asconf_len < sizeof(struct sctp_asconf_paramhdr))
|
if (asconf_len < sizeof(struct sctp_asconf_paramhdr))
|
||||||
break;
|
break;
|
||||||
stcb = sctp_findassociation_ep_asconf(m, iphlen,
|
stcb = sctp_findassociation_ep_asconf(m,
|
||||||
*offset, sh, &inp, netp, vrf_id);
|
*offset, sh, &inp, netp, vrf_id);
|
||||||
if (stcb != NULL)
|
if (stcb != NULL)
|
||||||
break;
|
break;
|
||||||
@ -4660,7 +4657,7 @@ __attribute__((noinline))
|
|||||||
if (netp) {
|
if (netp) {
|
||||||
sctp_handle_init(m, iphlen, *offset, sh,
|
sctp_handle_init(m, iphlen, *offset, sh,
|
||||||
(struct sctp_init_chunk *)ch, inp,
|
(struct sctp_init_chunk *)ch, inp,
|
||||||
stcb, *netp, &abort_no_unlock, vrf_id, port);
|
stcb, &abort_no_unlock, vrf_id, port);
|
||||||
}
|
}
|
||||||
if (abort_no_unlock)
|
if (abort_no_unlock)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
@ -4795,8 +4792,7 @@ __attribute__((noinline))
|
|||||||
sctp_express_handle_sack(stcb, cum_ack, a_rwnd, &abort_now, ecne_seen);
|
sctp_express_handle_sack(stcb, cum_ack, a_rwnd, &abort_now, ecne_seen);
|
||||||
} else {
|
} else {
|
||||||
if (netp && *netp)
|
if (netp && *netp)
|
||||||
sctp_handle_sack(m, offset_seg, offset_dup,
|
sctp_handle_sack(m, offset_seg, offset_dup, stcb,
|
||||||
stcb, *netp,
|
|
||||||
num_seg, 0, num_dup, &abort_now, flags,
|
num_seg, 0, num_dup, &abort_now, flags,
|
||||||
cum_ack, a_rwnd, ecne_seen);
|
cum_ack, a_rwnd, ecne_seen);
|
||||||
}
|
}
|
||||||
@ -4884,8 +4880,7 @@ __attribute__((noinline))
|
|||||||
&abort_now, ecne_seen);
|
&abort_now, ecne_seen);
|
||||||
} else {
|
} else {
|
||||||
if (netp && *netp)
|
if (netp && *netp)
|
||||||
sctp_handle_sack(m, offset_seg, offset_dup,
|
sctp_handle_sack(m, offset_seg, offset_dup, stcb,
|
||||||
stcb, *netp,
|
|
||||||
num_seg, num_nr_seg, num_dup, &abort_now, flags,
|
num_seg, num_nr_seg, num_dup, &abort_now, flags,
|
||||||
cum_ack, a_rwnd, ecne_seen);
|
cum_ack, a_rwnd, ecne_seen);
|
||||||
}
|
}
|
||||||
@ -5526,7 +5521,6 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset,
|
|||||||
uint32_t high_tsn;
|
uint32_t high_tsn;
|
||||||
int fwd_tsn_seen = 0, data_processed = 0;
|
int fwd_tsn_seen = 0, data_processed = 0;
|
||||||
struct mbuf *m = *mm;
|
struct mbuf *m = *mm;
|
||||||
int abort_flag = 0;
|
|
||||||
int un_sent;
|
int un_sent;
|
||||||
int cnt_ctrl_ready = 0;
|
int cnt_ctrl_ready = 0;
|
||||||
|
|
||||||
@ -5572,7 +5566,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset,
|
|||||||
inp = stcb->sctp_ep;
|
inp = stcb->sctp_ep;
|
||||||
if ((net) && (port)) {
|
if ((net) && (port)) {
|
||||||
if (net->port == 0) {
|
if (net->port == 0) {
|
||||||
sctp_pathmtu_adjustment(inp, stcb, net, net->mtu - sizeof(struct udphdr));
|
sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
|
||||||
}
|
}
|
||||||
net->port = port;
|
net->port = port;
|
||||||
}
|
}
|
||||||
@ -5719,11 +5713,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset,
|
|||||||
}
|
}
|
||||||
was_a_gap = SCTP_TSN_GT(highest_tsn, stcb->asoc.cumulative_tsn);
|
was_a_gap = SCTP_TSN_GT(highest_tsn, stcb->asoc.cumulative_tsn);
|
||||||
stcb->asoc.send_sack = 1;
|
stcb->asoc.send_sack = 1;
|
||||||
sctp_sack_check(stcb, was_a_gap, &abort_flag);
|
sctp_sack_check(stcb, was_a_gap);
|
||||||
if (abort_flag) {
|
|
||||||
/* Again, we aborted so NO UNLOCK needed */
|
|
||||||
goto out_now;
|
|
||||||
}
|
|
||||||
} else if (fwd_tsn_seen) {
|
} else if (fwd_tsn_seen) {
|
||||||
stcb->asoc.send_sack = 1;
|
stcb->asoc.send_sack = 1;
|
||||||
}
|
}
|
||||||
@ -5891,13 +5881,13 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port)
|
|||||||
SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n",
|
SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p mlen:%d iphlen:%d\n",
|
||||||
calc_check, check, m, mlen, iphlen);
|
calc_check, check, m, mlen, iphlen);
|
||||||
|
|
||||||
stcb = sctp_findassociation_addr(m, iphlen,
|
stcb = sctp_findassociation_addr(m,
|
||||||
offset - sizeof(*ch),
|
offset - sizeof(*ch),
|
||||||
sh, ch, &inp, &net,
|
sh, ch, &inp, &net,
|
||||||
vrf_id);
|
vrf_id);
|
||||||
if ((net) && (port)) {
|
if ((net) && (port)) {
|
||||||
if (net->port == 0) {
|
if (net->port == 0) {
|
||||||
sctp_pathmtu_adjustment(inp, stcb, net, net->mtu - sizeof(struct udphdr));
|
sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
|
||||||
}
|
}
|
||||||
net->port = port;
|
net->port = port;
|
||||||
}
|
}
|
||||||
@ -5928,11 +5918,11 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port)
|
|||||||
* Locate pcb and tcb for datagram sctp_findassociation_addr() wants
|
* Locate pcb and tcb for datagram sctp_findassociation_addr() wants
|
||||||
* IP/SCTP/first chunk header...
|
* IP/SCTP/first chunk header...
|
||||||
*/
|
*/
|
||||||
stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch),
|
stcb = sctp_findassociation_addr(m, offset - sizeof(*ch),
|
||||||
sh, ch, &inp, &net, vrf_id);
|
sh, ch, &inp, &net, vrf_id);
|
||||||
if ((net) && (port)) {
|
if ((net) && (port)) {
|
||||||
if (net->port == 0) {
|
if (net->port == 0) {
|
||||||
sctp_pathmtu_adjustment(inp, stcb, net, net->mtu - sizeof(struct udphdr));
|
sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
|
||||||
}
|
}
|
||||||
net->port = port;
|
net->port = port;
|
||||||
}
|
}
|
||||||
@ -5971,7 +5961,7 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port)
|
|||||||
sh->v_tag = init_chk->init.initiate_tag;
|
sh->v_tag = init_chk->init.initiate_tag;
|
||||||
}
|
}
|
||||||
if (ch->chunk_type == SCTP_SHUTDOWN_ACK) {
|
if (ch->chunk_type == SCTP_SHUTDOWN_ACK) {
|
||||||
sctp_send_shutdown_complete2(m, iphlen, sh, vrf_id, port);
|
sctp_send_shutdown_complete2(m, sh, vrf_id, port);
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) {
|
if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) {
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -1868,7 +1868,7 @@ sctp_is_address_in_scope(struct sctp_ifa *ifa,
|
|||||||
int ipv6_addr_legal,
|
int ipv6_addr_legal,
|
||||||
int loopback_scope,
|
int loopback_scope,
|
||||||
int ipv4_local_scope,
|
int ipv4_local_scope,
|
||||||
int local_scope,
|
int local_scope SCTP_UNUSED,/* XXX */
|
||||||
int site_scope,
|
int site_scope,
|
||||||
int do_update)
|
int do_update)
|
||||||
{
|
{
|
||||||
@ -2546,7 +2546,6 @@ sctp_choose_boundspecific_inp(struct sctp_inpcb *inp,
|
|||||||
static struct sctp_ifa *
|
static struct sctp_ifa *
|
||||||
sctp_choose_boundspecific_stcb(struct sctp_inpcb *inp,
|
sctp_choose_boundspecific_stcb(struct sctp_inpcb *inp,
|
||||||
struct sctp_tcb *stcb,
|
struct sctp_tcb *stcb,
|
||||||
struct sctp_nets *net,
|
|
||||||
sctp_route_t * ro,
|
sctp_route_t * ro,
|
||||||
uint32_t vrf_id,
|
uint32_t vrf_id,
|
||||||
uint8_t dest_is_priv,
|
uint8_t dest_is_priv,
|
||||||
@ -2865,8 +2864,7 @@ sctp_count_num_preferred_boundall(struct sctp_ifn *ifn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct sctp_ifa *
|
static struct sctp_ifa *
|
||||||
sctp_choose_boundall(struct sctp_inpcb *inp,
|
sctp_choose_boundall(struct sctp_tcb *stcb,
|
||||||
struct sctp_tcb *stcb,
|
|
||||||
struct sctp_nets *net,
|
struct sctp_nets *net,
|
||||||
sctp_route_t * ro,
|
sctp_route_t * ro,
|
||||||
uint32_t vrf_id,
|
uint32_t vrf_id,
|
||||||
@ -2886,6 +2884,7 @@ sctp_choose_boundall(struct sctp_inpcb *inp,
|
|||||||
int retried = 0;
|
int retried = 0;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* For boundall we can use any address in the association.
|
* For boundall we can use any address in the association.
|
||||||
* If non_asoc_addr_ok is set we can use any address (at least in
|
* If non_asoc_addr_ok is set we can use any address (at least in
|
||||||
@ -3330,7 +3329,7 @@ sctp_source_address_selection(struct sctp_inpcb *inp,
|
|||||||
/*
|
/*
|
||||||
* Bound all case
|
* Bound all case
|
||||||
*/
|
*/
|
||||||
answer = sctp_choose_boundall(inp, stcb, net, ro, vrf_id,
|
answer = sctp_choose_boundall(stcb, net, ro, vrf_id,
|
||||||
dest_is_priv, dest_is_loop,
|
dest_is_priv, dest_is_loop,
|
||||||
non_asoc_addr_ok, fam);
|
non_asoc_addr_ok, fam);
|
||||||
SCTP_IPI_ADDR_RUNLOCK();
|
SCTP_IPI_ADDR_RUNLOCK();
|
||||||
@ -3340,7 +3339,7 @@ sctp_source_address_selection(struct sctp_inpcb *inp,
|
|||||||
* Subset bound case
|
* Subset bound case
|
||||||
*/
|
*/
|
||||||
if (stcb) {
|
if (stcb) {
|
||||||
answer = sctp_choose_boundspecific_stcb(inp, stcb, net, ro,
|
answer = sctp_choose_boundspecific_stcb(inp, stcb, ro,
|
||||||
vrf_id, dest_is_priv,
|
vrf_id, dest_is_priv,
|
||||||
dest_is_loop,
|
dest_is_loop,
|
||||||
non_asoc_addr_ok, fam);
|
non_asoc_addr_ok, fam);
|
||||||
@ -3691,7 +3690,7 @@ sctp_findassociation_cmsgs(struct sctp_inpcb **inp_p,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct mbuf *
|
static struct mbuf *
|
||||||
sctp_add_cookie(struct sctp_inpcb *inp, struct mbuf *init, int init_offset,
|
sctp_add_cookie(struct mbuf *init, int init_offset,
|
||||||
struct mbuf *initack, int initack_offset, struct sctp_state_cookie *stc_in, uint8_t ** signature)
|
struct mbuf *initack, int initack_offset, struct sctp_state_cookie *stc_in, uint8_t ** signature)
|
||||||
{
|
{
|
||||||
struct mbuf *copy_init, *copy_initack, *m_at, *sig, *mret;
|
struct mbuf *copy_init, *copy_initack, *m_at, *sig, *mret;
|
||||||
@ -3802,8 +3801,7 @@ sctp_add_cookie(struct sctp_inpcb *inp, struct mbuf *init, int init_offset,
|
|||||||
|
|
||||||
|
|
||||||
static uint8_t
|
static uint8_t
|
||||||
sctp_get_ect(struct sctp_tcb *stcb,
|
sctp_get_ect(struct sctp_tcb *stcb)
|
||||||
struct sctp_tmit_chunk *chk)
|
|
||||||
{
|
{
|
||||||
if ((stcb != NULL) && (stcb->asoc.ecn_allowed == 1)) {
|
if ((stcb != NULL) && (stcb->asoc.ecn_allowed == 1)) {
|
||||||
return (SCTP_ECT0_BIT);
|
return (SCTP_ECT0_BIT);
|
||||||
@ -3868,15 +3866,15 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
|||||||
uint16_t auth_keyid,
|
uint16_t auth_keyid,
|
||||||
int nofragment_flag,
|
int nofragment_flag,
|
||||||
int ecn_ok,
|
int ecn_ok,
|
||||||
struct sctp_tmit_chunk *chk,
|
|
||||||
int out_of_asoc_ok,
|
int out_of_asoc_ok,
|
||||||
uint16_t src_port,
|
uint16_t src_port,
|
||||||
uint16_t dest_port,
|
uint16_t dest_port,
|
||||||
uint32_t v_tag,
|
uint32_t v_tag,
|
||||||
uint16_t port,
|
uint16_t port,
|
||||||
int so_locked,
|
|
||||||
#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
|
#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
|
||||||
SCTP_UNUSED
|
int so_locked SCTP_UNUSED,
|
||||||
|
#else
|
||||||
|
int so_locked,
|
||||||
#endif
|
#endif
|
||||||
union sctp_sockstore *over_addr,
|
union sctp_sockstore *over_addr,
|
||||||
struct mbuf *init
|
struct mbuf *init
|
||||||
@ -3984,7 +3982,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
|||||||
}
|
}
|
||||||
tos_value &= 0xfc;
|
tos_value &= 0xfc;
|
||||||
if (ecn_ok) {
|
if (ecn_ok) {
|
||||||
tos_value |= sctp_get_ect(stcb, chk);
|
tos_value |= sctp_get_ect(stcb);
|
||||||
}
|
}
|
||||||
if ((nofragment_flag) && (port == 0)) {
|
if ((nofragment_flag) && (port == 0)) {
|
||||||
ip->ip_off = IP_DF;
|
ip->ip_off = IP_DF;
|
||||||
@ -4296,7 +4294,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
|||||||
}
|
}
|
||||||
tos_value &= 0xfc;
|
tos_value &= 0xfc;
|
||||||
if (ecn_ok) {
|
if (ecn_ok) {
|
||||||
tos_value |= sctp_get_ect(stcb, chk);
|
tos_value |= sctp_get_ect(stcb);
|
||||||
}
|
}
|
||||||
flowinfo = 0x06;
|
flowinfo = 0x06;
|
||||||
flowinfo <<= 8;
|
flowinfo <<= 8;
|
||||||
@ -4860,7 +4858,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
|
|||||||
SCTPDBG(SCTP_DEBUG_OUTPUT4, "Sending INIT - calls lowlevel_output\n");
|
SCTPDBG(SCTP_DEBUG_OUTPUT4, "Sending INIT - calls lowlevel_output\n");
|
||||||
ret = sctp_lowlevel_chunk_output(inp, stcb, net,
|
ret = sctp_lowlevel_chunk_output(inp, stcb, net,
|
||||||
(struct sockaddr *)&net->ro._l_addr,
|
(struct sockaddr *)&net->ro._l_addr,
|
||||||
m, 0, NULL, 0, 0, 0, NULL, 0,
|
m, 0, NULL, 0, 0, 0, 0,
|
||||||
inp->sctp_lport, stcb->rport, htonl(0),
|
inp->sctp_lport, stcb->rport, htonl(0),
|
||||||
net->port, so_locked, NULL, NULL);
|
net->port, so_locked, NULL, NULL);
|
||||||
SCTPDBG(SCTP_DEBUG_OUTPUT4, "lowlevel_output - %d\n", ret);
|
SCTPDBG(SCTP_DEBUG_OUTPUT4, "lowlevel_output - %d\n", ret);
|
||||||
@ -5209,7 +5207,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_are_there_new_addresses(struct sctp_association *asoc,
|
sctp_are_there_new_addresses(struct sctp_association *asoc,
|
||||||
struct mbuf *in_initpkt, int iphlen, int offset)
|
struct mbuf *in_initpkt, int offset)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Given a INIT packet, look through the packet to verify that there
|
* Given a INIT packet, look through the packet to verify that there
|
||||||
@ -5434,7 +5432,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
|||||||
mp_last = NULL;
|
mp_last = NULL;
|
||||||
if ((asoc != NULL) &&
|
if ((asoc != NULL) &&
|
||||||
(SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) &&
|
(SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) &&
|
||||||
(sctp_are_there_new_addresses(asoc, init_pkt, iphlen, offset))) {
|
(sctp_are_there_new_addresses(asoc, init_pkt, offset))) {
|
||||||
/* new addresses, out of here in non-cookie-wait states */
|
/* new addresses, out of here in non-cookie-wait states */
|
||||||
/*
|
/*
|
||||||
* Send a ABORT, we don't add the new address error clause
|
* Send a ABORT, we don't add the new address error clause
|
||||||
@ -5999,7 +5997,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Now we must build a cookie */
|
/* Now we must build a cookie */
|
||||||
m_cookie = sctp_add_cookie(inp, init_pkt, offset, m, 0, &stc, &signature);
|
m_cookie = sctp_add_cookie(init_pkt, offset, m, 0, &stc, &signature);
|
||||||
if (m_cookie == NULL) {
|
if (m_cookie == NULL) {
|
||||||
/* memory problem */
|
/* memory problem */
|
||||||
sctp_m_freem(m);
|
sctp_m_freem(m);
|
||||||
@ -6054,7 +6052,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
(void)sctp_lowlevel_chunk_output(inp, NULL, NULL, to, m, 0, NULL, 0, 0,
|
(void)sctp_lowlevel_chunk_output(inp, NULL, NULL, to, m, 0, NULL, 0, 0,
|
||||||
0, NULL, 0,
|
0, 0,
|
||||||
inp->sctp_lport, sh->src_port, init_chk->init.initiate_tag,
|
inp->sctp_lport, sh->src_port, init_chk->init.initiate_tag,
|
||||||
port, SCTP_SO_NOT_LOCKED, over_addr, init_pkt);
|
port, SCTP_SO_NOT_LOCKED, over_addr, init_pkt);
|
||||||
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
|
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
|
||||||
@ -6518,7 +6516,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
|
sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
|
||||||
uint32_t val)
|
uint32_t val SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_copy_all *ca;
|
struct sctp_copy_all *ca;
|
||||||
struct mbuf *m;
|
struct mbuf *m;
|
||||||
@ -6718,7 +6716,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_sendall_completes(void *ptr, uint32_t val)
|
sctp_sendall_completes(void *ptr, uint32_t val SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_copy_all *ca;
|
struct sctp_copy_all *ca;
|
||||||
|
|
||||||
@ -8138,7 +8136,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
|||||||
(struct sockaddr *)&net->ro._l_addr,
|
(struct sockaddr *)&net->ro._l_addr,
|
||||||
outchain, auth_offset, auth,
|
outchain, auth_offset, auth,
|
||||||
stcb->asoc.authinfo.active_keyid,
|
stcb->asoc.authinfo.active_keyid,
|
||||||
no_fragmentflg, 0, NULL, asconf,
|
no_fragmentflg, 0, asconf,
|
||||||
inp->sctp_lport, stcb->rport,
|
inp->sctp_lport, stcb->rport,
|
||||||
htonl(stcb->asoc.peer_vtag),
|
htonl(stcb->asoc.peer_vtag),
|
||||||
net->port, so_locked, NULL, NULL))) {
|
net->port, so_locked, NULL, NULL))) {
|
||||||
@ -8399,7 +8397,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
|||||||
outchain,
|
outchain,
|
||||||
auth_offset, auth,
|
auth_offset, auth,
|
||||||
stcb->asoc.authinfo.active_keyid,
|
stcb->asoc.authinfo.active_keyid,
|
||||||
no_fragmentflg, 0, NULL, asconf,
|
no_fragmentflg, 0, asconf,
|
||||||
inp->sctp_lport, stcb->rport,
|
inp->sctp_lport, stcb->rport,
|
||||||
htonl(stcb->asoc.peer_vtag),
|
htonl(stcb->asoc.peer_vtag),
|
||||||
net->port, so_locked, NULL, NULL))) {
|
net->port, so_locked, NULL, NULL))) {
|
||||||
@ -8728,7 +8726,6 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
|||||||
auth_keyid,
|
auth_keyid,
|
||||||
no_fragmentflg,
|
no_fragmentflg,
|
||||||
bundle_at,
|
bundle_at,
|
||||||
data_list[0],
|
|
||||||
asconf,
|
asconf,
|
||||||
inp->sctp_lport, stcb->rport,
|
inp->sctp_lport, stcb->rport,
|
||||||
htonl(stcb->asoc.peer_vtag),
|
htonl(stcb->asoc.peer_vtag),
|
||||||
@ -9440,7 +9437,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
|
|||||||
if ((error = sctp_lowlevel_chunk_output(inp, stcb, chk->whoTo,
|
if ((error = sctp_lowlevel_chunk_output(inp, stcb, chk->whoTo,
|
||||||
(struct sockaddr *)&chk->whoTo->ro._l_addr, m,
|
(struct sockaddr *)&chk->whoTo->ro._l_addr, m,
|
||||||
auth_offset, auth, stcb->asoc.authinfo.active_keyid,
|
auth_offset, auth, stcb->asoc.authinfo.active_keyid,
|
||||||
no_fragmentflg, 0, NULL, 0,
|
no_fragmentflg, 0, 0,
|
||||||
inp->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
|
inp->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
|
||||||
chk->whoTo->port, so_locked, NULL, NULL))) {
|
chk->whoTo->port, so_locked, NULL, NULL))) {
|
||||||
SCTP_STAT_INCR(sctps_lowlevelerr);
|
SCTP_STAT_INCR(sctps_lowlevelerr);
|
||||||
@ -9698,7 +9695,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
|
|||||||
if ((error = sctp_lowlevel_chunk_output(inp, stcb, net,
|
if ((error = sctp_lowlevel_chunk_output(inp, stcb, net,
|
||||||
(struct sockaddr *)&net->ro._l_addr, m,
|
(struct sockaddr *)&net->ro._l_addr, m,
|
||||||
auth_offset, auth, auth_keyid,
|
auth_offset, auth, auth_keyid,
|
||||||
no_fragmentflg, 0, NULL, 0,
|
no_fragmentflg, 0, 0,
|
||||||
inp->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
|
inp->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
|
||||||
net->port, so_locked, NULL, NULL))) {
|
net->port, so_locked, NULL, NULL))) {
|
||||||
/* error, we could not output */
|
/* error, we could not output */
|
||||||
@ -10137,13 +10134,13 @@ sctp_chunk_output(struct sctp_inpcb *inp,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
sctp_output(inp, m, addr, control, p, flags)
|
sctp_output(
|
||||||
struct sctp_inpcb *inp;
|
struct sctp_inpcb *inp,
|
||||||
struct mbuf *m;
|
struct mbuf *m,
|
||||||
struct sockaddr *addr;
|
struct sockaddr *addr,
|
||||||
struct mbuf *control;
|
struct mbuf *control,
|
||||||
struct thread *p;
|
struct thread *p,
|
||||||
int flags;
|
int flags)
|
||||||
{
|
{
|
||||||
if (inp == NULL) {
|
if (inp == NULL) {
|
||||||
SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL);
|
SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL);
|
||||||
@ -10817,7 +10814,7 @@ sctp_send_abort_tcb(struct sctp_tcb *stcb, struct mbuf *operr, int so_locked
|
|||||||
|
|
||||||
(void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net,
|
(void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net,
|
||||||
(struct sockaddr *)&net->ro._l_addr,
|
(struct sockaddr *)&net->ro._l_addr,
|
||||||
m_out, auth_offset, auth, stcb->asoc.authinfo.active_keyid, 1, 0, NULL, 0,
|
m_out, auth_offset, auth, stcb->asoc.authinfo.active_keyid, 1, 0, 0,
|
||||||
stcb->sctp_ep->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
|
stcb->sctp_ep->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag),
|
||||||
stcb->asoc.primary_destination->port, so_locked, NULL, NULL);
|
stcb->asoc.primary_destination->port, so_locked, NULL, NULL);
|
||||||
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
|
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
|
||||||
@ -10853,7 +10850,7 @@ sctp_send_shutdown_complete(struct sctp_tcb *stcb,
|
|||||||
SCTP_BUF_LEN(m_shutdown_comp) = sizeof(struct sctp_shutdown_complete_chunk);
|
SCTP_BUF_LEN(m_shutdown_comp) = sizeof(struct sctp_shutdown_complete_chunk);
|
||||||
(void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net,
|
(void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net,
|
||||||
(struct sockaddr *)&net->ro._l_addr,
|
(struct sockaddr *)&net->ro._l_addr,
|
||||||
m_shutdown_comp, 0, NULL, 0, 1, 0, NULL, 0,
|
m_shutdown_comp, 0, NULL, 0, 1, 0, 0,
|
||||||
stcb->sctp_ep->sctp_lport, stcb->rport,
|
stcb->sctp_ep->sctp_lport, stcb->rport,
|
||||||
htonl(vtag),
|
htonl(vtag),
|
||||||
net->port, SCTP_SO_NOT_LOCKED, NULL, NULL);
|
net->port, SCTP_SO_NOT_LOCKED, NULL, NULL);
|
||||||
@ -10862,7 +10859,7 @@ sctp_send_shutdown_complete(struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh,
|
sctp_send_shutdown_complete2(struct mbuf *m, struct sctphdr *sh,
|
||||||
uint32_t vrf_id, uint16_t port)
|
uint32_t vrf_id, uint16_t port)
|
||||||
{
|
{
|
||||||
/* formulate and SEND a SHUTDOWN-COMPLETE */
|
/* formulate and SEND a SHUTDOWN-COMPLETE */
|
||||||
@ -12348,9 +12345,7 @@ sctp_send_operr_to(struct mbuf *m, int iphlen, struct mbuf *scm, uint32_t vtag,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct mbuf *
|
static struct mbuf *
|
||||||
sctp_copy_resume(struct sctp_stream_queue_pending *sp,
|
sctp_copy_resume(struct uio *uio,
|
||||||
struct uio *uio,
|
|
||||||
struct sctp_sndrcvinfo *srcv,
|
|
||||||
int max_send_len,
|
int max_send_len,
|
||||||
int user_marks_eor,
|
int user_marks_eor,
|
||||||
int *error,
|
int *error,
|
||||||
@ -12399,8 +12394,7 @@ sctp_copy_it_in(struct sctp_tcb *stcb,
|
|||||||
struct sctp_nets *net,
|
struct sctp_nets *net,
|
||||||
int max_send_len,
|
int max_send_len,
|
||||||
int user_marks_eor,
|
int user_marks_eor,
|
||||||
int *error,
|
int *error)
|
||||||
int non_blocking)
|
|
||||||
{
|
{
|
||||||
/*-
|
/*-
|
||||||
* This routine must be very careful in its work. Protocol
|
* This routine must be very careful in its work. Protocol
|
||||||
@ -13105,7 +13099,7 @@ sctp_lower_sosend(struct socket *so,
|
|||||||
stcb->asoc.chunks_on_out_queue,
|
stcb->asoc.chunks_on_out_queue,
|
||||||
SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue));
|
SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue));
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
||||||
sctp_log_block(SCTP_BLOCK_LOG_INTO_BLKA, so, asoc, sndlen);
|
sctp_log_block(SCTP_BLOCK_LOG_INTO_BLKA, asoc, sndlen);
|
||||||
}
|
}
|
||||||
be.error = 0;
|
be.error = 0;
|
||||||
stcb->block_entry = &be;
|
stcb->block_entry = &be;
|
||||||
@ -13124,7 +13118,7 @@ sctp_lower_sosend(struct socket *so,
|
|||||||
}
|
}
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
||||||
sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,
|
sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,
|
||||||
so, asoc, stcb->asoc.total_output_queue_size);
|
asoc, stcb->asoc.total_output_queue_size);
|
||||||
}
|
}
|
||||||
if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
|
if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
|
||||||
goto out_unlocked;
|
goto out_unlocked;
|
||||||
@ -13174,7 +13168,7 @@ sctp_lower_sosend(struct socket *so,
|
|||||||
strm = &stcb->asoc.strmout[srcv->sinfo_stream];
|
strm = &stcb->asoc.strmout[srcv->sinfo_stream];
|
||||||
if (strm->last_msg_incomplete == 0) {
|
if (strm->last_msg_incomplete == 0) {
|
||||||
do_a_copy_in:
|
do_a_copy_in:
|
||||||
sp = sctp_copy_it_in(stcb, asoc, srcv, uio, net, max_len, user_marks_eor, &error, non_blocking);
|
sp = sctp_copy_it_in(stcb, asoc, srcv, uio, net, max_len, user_marks_eor, &error);
|
||||||
if ((sp == NULL) || (error)) {
|
if ((sp == NULL) || (error)) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -13242,7 +13236,7 @@ sctp_lower_sosend(struct socket *so,
|
|||||||
SCTP_TCB_UNLOCK(stcb);
|
SCTP_TCB_UNLOCK(stcb);
|
||||||
hold_tcblock = 0;
|
hold_tcblock = 0;
|
||||||
}
|
}
|
||||||
mm = sctp_copy_resume(sp, uio, srcv, max_len, user_marks_eor, &error, &sndout, &new_tail);
|
mm = sctp_copy_resume(uio, max_len, user_marks_eor, &error, &sndout, &new_tail);
|
||||||
if ((mm == NULL) || error) {
|
if ((mm == NULL) || error) {
|
||||||
if (mm) {
|
if (mm) {
|
||||||
sctp_m_freem(mm);
|
sctp_m_freem(mm);
|
||||||
@ -13424,7 +13418,7 @@ sctp_lower_sosend(struct socket *so,
|
|||||||
min(SCTP_BASE_SYSCTL(sctp_add_more_threshold), SCTP_SB_LIMIT_SND(so)))) {
|
min(SCTP_BASE_SYSCTL(sctp_add_more_threshold), SCTP_SB_LIMIT_SND(so)))) {
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
||||||
sctp_log_block(SCTP_BLOCK_LOG_INTO_BLK,
|
sctp_log_block(SCTP_BLOCK_LOG_INTO_BLK,
|
||||||
so, asoc, uio->uio_resid);
|
asoc, uio->uio_resid);
|
||||||
}
|
}
|
||||||
be.error = 0;
|
be.error = 0;
|
||||||
stcb->block_entry = &be;
|
stcb->block_entry = &be;
|
||||||
@ -13444,7 +13438,7 @@ sctp_lower_sosend(struct socket *so,
|
|||||||
}
|
}
|
||||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
||||||
sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,
|
sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,
|
||||||
so, asoc, stcb->asoc.total_output_queue_size);
|
asoc, stcb->asoc.total_output_queue_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SOCKBUF_UNLOCK(&so->so_snd);
|
SOCKBUF_UNLOCK(&so->so_snd);
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -117,7 +117,7 @@ void sctp_send_shutdown_ack(struct sctp_tcb *, struct sctp_nets *);
|
|||||||
void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *, int);
|
void sctp_send_shutdown_complete(struct sctp_tcb *, struct sctp_nets *, int);
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_send_shutdown_complete2(struct mbuf *, int, struct sctphdr *,
|
sctp_send_shutdown_complete2(struct mbuf *, struct sctphdr *,
|
||||||
uint32_t, uint16_t);
|
uint32_t, uint16_t);
|
||||||
|
|
||||||
void sctp_send_asconf(struct sctp_tcb *, struct sctp_nets *, int addr_locked);
|
void sctp_send_asconf(struct sctp_tcb *, struct sctp_nets *, int addr_locked);
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -1949,7 +1949,7 @@ sctp_findassociation_addr_sa(struct sockaddr *to, struct sockaddr *from,
|
|||||||
* address will be used to lookup the TCB and see if one exits.
|
* address will be used to lookup the TCB and see if one exits.
|
||||||
*/
|
*/
|
||||||
static struct sctp_tcb *
|
static struct sctp_tcb *
|
||||||
sctp_findassociation_special_addr(struct mbuf *m, int iphlen, int offset,
|
sctp_findassociation_special_addr(struct mbuf *m, int offset,
|
||||||
struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp,
|
struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp,
|
||||||
struct sockaddr *dest)
|
struct sockaddr *dest)
|
||||||
{
|
{
|
||||||
@ -2069,6 +2069,10 @@ sctp_findassoc_by_vtag(struct sockaddr *from, struct sockaddr *to, uint32_t vtag
|
|||||||
SCTP_INP_RUNLOCK(stcb->sctp_ep);
|
SCTP_INP_RUNLOCK(stcb->sctp_ep);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (stcb->sctp_ep->def_vrf_id != vrf_id) {
|
||||||
|
SCTP_INP_RUNLOCK(stcb->sctp_ep);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
SCTP_TCB_LOCK(stcb);
|
SCTP_TCB_LOCK(stcb);
|
||||||
SCTP_INP_RUNLOCK(stcb->sctp_ep);
|
SCTP_INP_RUNLOCK(stcb->sctp_ep);
|
||||||
if (stcb->asoc.my_vtag == vtag) {
|
if (stcb->asoc.my_vtag == vtag) {
|
||||||
@ -2144,7 +2148,7 @@ sctp_findassoc_by_vtag(struct sockaddr *from, struct sockaddr *to, uint32_t vtag
|
|||||||
* a IPv4 or IPv6 packet.
|
* a IPv4 or IPv6 packet.
|
||||||
*/
|
*/
|
||||||
struct sctp_tcb *
|
struct sctp_tcb *
|
||||||
sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset,
|
sctp_findassociation_addr(struct mbuf *m, int offset,
|
||||||
struct sctphdr *sh, struct sctp_chunkhdr *ch,
|
struct sctphdr *sh, struct sctp_chunkhdr *ch,
|
||||||
struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
|
struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
|
||||||
{
|
{
|
||||||
@ -2284,7 +2288,7 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset,
|
|||||||
}
|
}
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
retval = sctp_findassociation_special_addr(m, iphlen,
|
retval = sctp_findassociation_special_addr(m,
|
||||||
offset, sh, &inp, netp, to);
|
offset, sh, &inp, netp, to);
|
||||||
if (inp_p != NULL) {
|
if (inp_p != NULL) {
|
||||||
*inp_p = inp;
|
*inp_p = inp;
|
||||||
@ -2300,7 +2304,7 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset,
|
|||||||
* if the lookup address is 0.0.0.0 or ::0, use the vtag to do the lookup
|
* if the lookup address is 0.0.0.0 or ::0, use the vtag to do the lookup
|
||||||
*/
|
*/
|
||||||
struct sctp_tcb *
|
struct sctp_tcb *
|
||||||
sctp_findassociation_ep_asconf(struct mbuf *m, int iphlen, int offset,
|
sctp_findassociation_ep_asconf(struct mbuf *m, int offset,
|
||||||
struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
|
struct sctphdr *sh, struct sctp_inpcb **inp_p, struct sctp_nets **netp, uint32_t vrf_id)
|
||||||
{
|
{
|
||||||
struct sctp_tcb *stcb;
|
struct sctp_tcb *stcb;
|
||||||
@ -5734,7 +5738,7 @@ sctp_mcore_thread(void *arg)
|
|||||||
/* Now lets start working */
|
/* Now lets start working */
|
||||||
SCTP_MCORE_LOCK(wkq);
|
SCTP_MCORE_LOCK(wkq);
|
||||||
/* Now grab lock and go */
|
/* Now grab lock and go */
|
||||||
while (1) {
|
for (;;) {
|
||||||
SCTP_MCORE_QLOCK(wkq);
|
SCTP_MCORE_QLOCK(wkq);
|
||||||
skip_sleep:
|
skip_sleep:
|
||||||
wkq->running = 1;
|
wkq->running = 1;
|
||||||
@ -6101,7 +6105,7 @@ sctp_pcb_finish(void)
|
|||||||
|
|
||||||
int
|
int
|
||||||
sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
|
sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
|
||||||
int iphlen, int offset, int limit, struct sctphdr *sh,
|
int offset, int limit, struct sctphdr *sh,
|
||||||
struct sockaddr *altsa)
|
struct sockaddr *altsa)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -6816,7 +6820,7 @@ sctp_set_primary_addr(struct sctp_tcb *stcb, struct sockaddr *sa,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
sctp_is_vtag_good(struct sctp_inpcb *inp, uint32_t tag, uint16_t lport, uint16_t rport, struct timeval *now, int save_in_twait)
|
sctp_is_vtag_good(uint32_t tag, uint16_t lport, uint16_t rport, struct timeval *now)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This function serves two purposes. It will see if a TAG can be
|
* This function serves two purposes. It will see if a TAG can be
|
||||||
@ -6896,7 +6900,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp, uint32_t tag, uint16_t lport, uint16_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_drain_mbufs(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
|
sctp_drain_mbufs(struct sctp_tcb *stcb)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We must hunt this association for MBUF's past the cumack (i.e.
|
* We must hunt this association for MBUF's past the cumack (i.e.
|
||||||
@ -7041,7 +7045,7 @@ sctp_drain()
|
|||||||
LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
|
LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
|
||||||
/* For each association */
|
/* For each association */
|
||||||
SCTP_TCB_LOCK(stcb);
|
SCTP_TCB_LOCK(stcb);
|
||||||
sctp_drain_mbufs(inp, stcb);
|
sctp_drain_mbufs(stcb);
|
||||||
SCTP_TCB_UNLOCK(stcb);
|
SCTP_TCB_UNLOCK(stcb);
|
||||||
}
|
}
|
||||||
SCTP_INP_RUNLOCK(inp);
|
SCTP_INP_RUNLOCK(inp);
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -527,7 +527,7 @@ sctp_inpcb_bind(struct socket *, struct sockaddr *,
|
|||||||
struct sctp_ifa *, struct thread *);
|
struct sctp_ifa *, struct thread *);
|
||||||
|
|
||||||
struct sctp_tcb *
|
struct sctp_tcb *
|
||||||
sctp_findassociation_addr(struct mbuf *, int, int,
|
sctp_findassociation_addr(struct mbuf *, int,
|
||||||
struct sctphdr *, struct sctp_chunkhdr *, struct sctp_inpcb **,
|
struct sctphdr *, struct sctp_chunkhdr *, struct sctp_inpcb **,
|
||||||
struct sctp_nets **, uint32_t vrf_id);
|
struct sctp_nets **, uint32_t vrf_id);
|
||||||
|
|
||||||
@ -558,7 +558,7 @@ sctp_findassociation_ep_asocid(struct sctp_inpcb *,
|
|||||||
sctp_assoc_t, int);
|
sctp_assoc_t, int);
|
||||||
|
|
||||||
struct sctp_tcb *
|
struct sctp_tcb *
|
||||||
sctp_findassociation_ep_asconf(struct mbuf *, int, int,
|
sctp_findassociation_ep_asconf(struct mbuf *, int,
|
||||||
struct sctphdr *, struct sctp_inpcb **, struct sctp_nets **, uint32_t vrf_id);
|
struct sctphdr *, struct sctp_inpcb **, struct sctp_nets **, uint32_t vrf_id);
|
||||||
|
|
||||||
int sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id);
|
int sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id);
|
||||||
@ -603,14 +603,14 @@ void sctp_add_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
|
|||||||
void sctp_del_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
|
void sctp_del_local_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
|
||||||
|
|
||||||
int
|
int
|
||||||
sctp_load_addresses_from_init(struct sctp_tcb *, struct mbuf *, int, int,
|
sctp_load_addresses_from_init(struct sctp_tcb *, struct mbuf *, int,
|
||||||
int, struct sctphdr *, struct sockaddr *);
|
int, struct sctphdr *, struct sockaddr *);
|
||||||
|
|
||||||
int
|
int
|
||||||
sctp_set_primary_addr(struct sctp_tcb *, struct sockaddr *,
|
sctp_set_primary_addr(struct sctp_tcb *, struct sockaddr *,
|
||||||
struct sctp_nets *);
|
struct sctp_nets *);
|
||||||
|
|
||||||
int sctp_is_vtag_good(struct sctp_inpcb *, uint32_t, uint16_t lport, uint16_t rport, struct timeval *, int);
|
int sctp_is_vtag_good(uint32_t, uint16_t lport, uint16_t rport, struct timeval *);
|
||||||
|
|
||||||
/* void sctp_drain(void); */
|
/* void sctp_drain(void); */
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
@ -68,7 +68,7 @@ sctp_ss_default_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
int clear_values, int holds_lock)
|
int clear_values SCTP_UNUSED, int holds_lock)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
if (holds_lock == 0) {
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
SCTP_TCB_SEND_LOCK(stcb);
|
||||||
@ -88,7 +88,7 @@ sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_default_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
|
sctp_ss_default_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
strq->ss_params.rr.next_spoke.tqe_next = NULL;
|
strq->ss_params.rr.next_spoke.tqe_next = NULL;
|
||||||
strq->ss_params.rr.next_spoke.tqe_prev = NULL;
|
strq->ss_params.rr.next_spoke.tqe_prev = NULL;
|
||||||
@ -98,7 +98,7 @@ sctp_ss_default_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out
|
|||||||
static void
|
static void
|
||||||
sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq,
|
struct sctp_stream_out *strq,
|
||||||
struct sctp_stream_queue_pending *sp, int holds_lock)
|
struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
if (holds_lock == 0) {
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
SCTP_TCB_SEND_LOCK(stcb);
|
||||||
@ -117,7 +117,7 @@ sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_ss_default_is_empty(struct sctp_tcb *stcb, struct sctp_association *asoc)
|
sctp_ss_default_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc)
|
||||||
{
|
{
|
||||||
if (TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
|
if (TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
|
||||||
return (1);
|
return (1);
|
||||||
@ -129,7 +129,7 @@ sctp_ss_default_is_empty(struct sctp_tcb *stcb, struct sctp_association *asoc)
|
|||||||
static void
|
static void
|
||||||
sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq,
|
struct sctp_stream_out *strq,
|
||||||
struct sctp_stream_queue_pending *sp, int holds_lock)
|
struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
if (holds_lock == 0) {
|
||||||
SCTP_TCB_SEND_LOCK(stcb);
|
SCTP_TCB_SEND_LOCK(stcb);
|
||||||
@ -165,7 +165,7 @@ sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
|
|
||||||
|
|
||||||
static struct sctp_stream_out *
|
static struct sctp_stream_out *
|
||||||
sctp_ss_default_select(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_default_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
|
||||||
struct sctp_association *asoc)
|
struct sctp_association *asoc)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strq, *strqt;
|
struct sctp_stream_out *strq, *strqt;
|
||||||
@ -208,33 +208,33 @@ sctp_ss_default_select(struct sctp_tcb *stcb, struct sctp_nets *net,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_default_scheduled(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_default_scheduled(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net SCTP_UNUSED,
|
||||||
struct sctp_association *asoc,
|
struct sctp_association *asoc SCTP_UNUSED,
|
||||||
struct sctp_stream_out *strq, int moved_how_much)
|
struct sctp_stream_out *strq, int moved_how_much SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
asoc->last_out_stream = strq;
|
asoc->last_out_stream = strq;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_default_packet_done(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_default_packet_done(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net SCTP_UNUSED,
|
||||||
struct sctp_association *asoc)
|
struct sctp_association *asoc SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
/* Nothing to be done here */
|
/* Nothing to be done here */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_ss_default_get_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_get_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
|
||||||
struct sctp_stream_out *strq, uint16_t * value)
|
struct sctp_stream_out *strq SCTP_UNUSED, uint16_t * value SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
/* Nothing to be done here */
|
/* Nothing to be done here */
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_ss_default_set_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_default_set_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
|
||||||
struct sctp_stream_out *strq, uint16_t value)
|
struct sctp_stream_out *strq SCTP_UNUSED, uint16_t value SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
/* Nothing to be done here */
|
/* Nothing to be done here */
|
||||||
return (-1);
|
return (-1);
|
||||||
@ -247,7 +247,7 @@ sctp_ss_default_set_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
static void
|
static void
|
||||||
sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq,
|
struct sctp_stream_out *strq,
|
||||||
struct sctp_stream_queue_pending *sp, int holds_lock)
|
struct sctp_stream_queue_pending *sp SCTP_UNUSED, int holds_lock)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strqt;
|
struct sctp_stream_out *strqt;
|
||||||
|
|
||||||
@ -283,14 +283,14 @@ sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
* only fills messages of the same stream in a packet.
|
* only fills messages of the same stream in a packet.
|
||||||
*/
|
*/
|
||||||
static struct sctp_stream_out *
|
static struct sctp_stream_out *
|
||||||
sctp_ss_rrp_select(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_rrp_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net SCTP_UNUSED,
|
||||||
struct sctp_association *asoc)
|
struct sctp_association *asoc)
|
||||||
{
|
{
|
||||||
return asoc->last_out_stream;
|
return asoc->last_out_stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_rrp_packet_done(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_rrp_packet_done(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
|
||||||
struct sctp_association *asoc)
|
struct sctp_association *asoc)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strq, *strqt;
|
struct sctp_stream_out *strq, *strqt;
|
||||||
@ -378,7 +378,7 @@ sctp_ss_prio_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *w
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
|
||||||
int holds_lock)
|
int holds_lock)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strqt;
|
struct sctp_stream_out *strqt;
|
||||||
@ -412,7 +412,7 @@ sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
|
||||||
int holds_lock)
|
int holds_lock)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
if (holds_lock == 0) {
|
||||||
@ -447,7 +447,7 @@ sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct sctp_stream_out *
|
static struct sctp_stream_out *
|
||||||
sctp_ss_prio_select(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_prio_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
|
||||||
struct sctp_association *asoc)
|
struct sctp_association *asoc)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strq, *strqt, *strqn;
|
struct sctp_stream_out *strq, *strqt, *strqn;
|
||||||
@ -493,7 +493,7 @@ sctp_ss_prio_select(struct sctp_tcb *stcb, struct sctp_nets *net,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_ss_prio_get_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_prio_get_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
|
||||||
struct sctp_stream_out *strq, uint16_t * value)
|
struct sctp_stream_out *strq, uint16_t * value)
|
||||||
{
|
{
|
||||||
if (strq == NULL) {
|
if (strq == NULL) {
|
||||||
@ -559,7 +559,7 @@ sctp_ss_fb_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *wit
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
|
||||||
int holds_lock)
|
int holds_lock)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
if (holds_lock == 0) {
|
||||||
@ -580,7 +580,7 @@ sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
|
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp SCTP_UNUSED,
|
||||||
int holds_lock)
|
int holds_lock)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
if (holds_lock == 0) {
|
||||||
@ -615,7 +615,7 @@ sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct sctp_stream_out *
|
static struct sctp_stream_out *
|
||||||
sctp_ss_fb_select(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_fb_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
|
||||||
struct sctp_association *asoc)
|
struct sctp_association *asoc)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strq = NULL, *strqt;
|
struct sctp_stream_out *strq = NULL, *strqt;
|
||||||
@ -648,9 +648,9 @@ sctp_ss_fb_select(struct sctp_tcb *stcb, struct sctp_nets *net,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fb_scheduled(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_fb_scheduled(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net SCTP_UNUSED,
|
||||||
struct sctp_association *asoc, struct sctp_stream_out *strq,
|
struct sctp_association *asoc, struct sctp_stream_out *strq,
|
||||||
int moved_how_much)
|
int moved_how_much SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strqt;
|
struct sctp_stream_out *strqt;
|
||||||
int subtract;
|
int subtract;
|
||||||
@ -732,7 +732,7 @@ sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fcfs_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *with_strq)
|
sctp_ss_fcfs_init_stream(struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_out *with_strq SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
/* Nothing to be done here */
|
/* Nothing to be done here */
|
||||||
return;
|
return;
|
||||||
@ -740,7 +740,7 @@ sctp_ss_fcfs_init_stream(struct sctp_stream_out *strq, struct sctp_stream_out *w
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
|
struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
|
||||||
int holds_lock)
|
int holds_lock)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
if (holds_lock == 0) {
|
||||||
@ -757,7 +757,7 @@ sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb, struct sctp_association *asoc)
|
sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc)
|
||||||
{
|
{
|
||||||
if (TAILQ_EMPTY(&asoc->ss_data.out_list)) {
|
if (TAILQ_EMPTY(&asoc->ss_data.out_list)) {
|
||||||
return (1);
|
return (1);
|
||||||
@ -768,7 +768,7 @@ sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb, struct sctp_association *asoc)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||||
struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
|
struct sctp_stream_out *strq SCTP_UNUSED, struct sctp_stream_queue_pending *sp,
|
||||||
int holds_lock)
|
int holds_lock)
|
||||||
{
|
{
|
||||||
if (holds_lock == 0) {
|
if (holds_lock == 0) {
|
||||||
@ -787,7 +787,7 @@ sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
|||||||
|
|
||||||
|
|
||||||
static struct sctp_stream_out *
|
static struct sctp_stream_out *
|
||||||
sctp_ss_fcfs_select(struct sctp_tcb *stcb, struct sctp_nets *net,
|
sctp_ss_fcfs_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
|
||||||
struct sctp_association *asoc)
|
struct sctp_association *asoc)
|
||||||
{
|
{
|
||||||
struct sctp_stream_out *strq;
|
struct sctp_stream_out *strq;
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -138,7 +138,7 @@ sctp_init_sysctls()
|
|||||||
static unsigned int
|
static unsigned int
|
||||||
number_of_addresses(struct sctp_inpcb *inp)
|
number_of_addresses(struct sctp_inpcb *inp)
|
||||||
{
|
{
|
||||||
int cnt;
|
unsigned int cnt;
|
||||||
struct sctp_vrf *vrf;
|
struct sctp_vrf *vrf;
|
||||||
struct sctp_ifn *sctp_ifn;
|
struct sctp_ifn *sctp_ifn;
|
||||||
struct sctp_ifa *sctp_ifa;
|
struct sctp_ifa *sctp_ifa;
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -1035,7 +1035,7 @@ sctp_t1init_timer(struct sctp_inpcb *inp,
|
|||||||
int
|
int
|
||||||
sctp_cookie_timer(struct sctp_inpcb *inp,
|
sctp_cookie_timer(struct sctp_inpcb *inp,
|
||||||
struct sctp_tcb *stcb,
|
struct sctp_tcb *stcb,
|
||||||
struct sctp_nets *net)
|
struct sctp_nets *net SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_nets *alt;
|
struct sctp_nets *alt;
|
||||||
struct sctp_tmit_chunk *cookie;
|
struct sctp_tmit_chunk *cookie;
|
||||||
@ -1264,7 +1264,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
|||||||
/* Mobility adaptation */
|
/* Mobility adaptation */
|
||||||
void
|
void
|
||||||
sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||||
struct sctp_nets *net)
|
struct sctp_nets *net SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
if (stcb->asoc.deleted_primary == NULL) {
|
if (stcb->asoc.deleted_primary == NULL) {
|
||||||
SCTPDBG(SCTP_DEBUG_ASCONF1, "delete_prim_timer: deleted_primary is not stored...\n");
|
SCTPDBG(SCTP_DEBUG_ASCONF1, "delete_prim_timer: deleted_primary is not stored...\n");
|
||||||
@ -1451,7 +1451,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *inp,
|
|||||||
{
|
{
|
||||||
uint32_t next_mtu, mtu;
|
uint32_t next_mtu, mtu;
|
||||||
|
|
||||||
next_mtu = sctp_get_next_mtu(inp, net->mtu);
|
next_mtu = sctp_get_next_mtu(net->mtu);
|
||||||
|
|
||||||
if ((next_mtu > net->mtu) && (net->port == 0)) {
|
if ((next_mtu > net->mtu) && (net->port == 0)) {
|
||||||
if ((net->src_addr_selected == 0) ||
|
if ((net->src_addr_selected == 0) ||
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -101,10 +101,7 @@ sctp_finish(void)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_pathmtu_adjustment(struct sctp_inpcb *inp,
|
sctp_pathmtu_adjustment(struct sctp_tcb *stcb, uint16_t nxtsz)
|
||||||
struct sctp_tcb *stcb,
|
|
||||||
struct sctp_nets *net,
|
|
||||||
uint16_t nxtsz)
|
|
||||||
{
|
{
|
||||||
struct sctp_tmit_chunk *chk;
|
struct sctp_tmit_chunk *chk;
|
||||||
uint16_t overhead;
|
uint16_t overhead;
|
||||||
@ -213,7 +210,7 @@ sctp_notify_mbuf(struct sctp_inpcb *inp,
|
|||||||
}
|
}
|
||||||
/* now what about the ep? */
|
/* now what about the ep? */
|
||||||
if (stcb->asoc.smallest_mtu > nxtsz) {
|
if (stcb->asoc.smallest_mtu > nxtsz) {
|
||||||
sctp_pathmtu_adjustment(inp, stcb, net, nxtsz);
|
sctp_pathmtu_adjustment(stcb, nxtsz);
|
||||||
}
|
}
|
||||||
if (tmr_stopped)
|
if (tmr_stopped)
|
||||||
sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net);
|
sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net);
|
||||||
@ -490,7 +487,7 @@ sctp_abort(struct socket *so)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp_attach(struct socket *so, int proto, struct thread *p)
|
sctp_attach(struct socket *so, int proto SCTP_UNUSED, struct thread *p SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct sctp_inpcb *inp;
|
struct sctp_inpcb *inp;
|
||||||
struct inpcb *ip_inp;
|
struct inpcb *ip_inp;
|
||||||
@ -4739,7 +4736,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
|||||||
if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) {
|
if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) {
|
||||||
net->mtu = paddrp->spp_pathmtu + ovh;
|
net->mtu = paddrp->spp_pathmtu + ovh;
|
||||||
if (net->mtu < stcb->asoc.smallest_mtu) {
|
if (net->mtu < stcb->asoc.smallest_mtu) {
|
||||||
sctp_pathmtu_adjustment(inp, stcb, net, net->mtu);
|
sctp_pathmtu_adjustment(stcb, net->mtu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4863,7 +4860,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
|||||||
if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) {
|
if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) {
|
||||||
net->mtu = paddrp->spp_pathmtu + ovh;
|
net->mtu = paddrp->spp_pathmtu + ovh;
|
||||||
if (net->mtu < stcb->asoc.smallest_mtu) {
|
if (net->mtu < stcb->asoc.smallest_mtu) {
|
||||||
sctp_pathmtu_adjustment(inp, stcb, net, net->mtu);
|
sctp_pathmtu_adjustment(stcb, net->mtu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5287,7 +5284,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
|||||||
error = EAFNOSUPPORT;
|
error = EAFNOSUPPORT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sctp_bindx_delete_address(so, inp, addrs->addr,
|
sctp_bindx_delete_address(inp, addrs->addr,
|
||||||
addrs->sget_assoc_id, vrf_id,
|
addrs->sget_assoc_id, vrf_id,
|
||||||
&error);
|
&error);
|
||||||
break;
|
break;
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -334,7 +334,7 @@ void sctp_input_with_port __P((struct mbuf *, int, uint16_t));
|
|||||||
void sctp_input __P((struct mbuf *, int));
|
void sctp_input __P((struct mbuf *, int));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
void sctp_pathmtu_adjustment __P((struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, uint16_t));
|
void sctp_pathmtu_adjustment __P((struct sctp_tcb *, uint16_t));
|
||||||
void sctp_drain __P((void));
|
void sctp_drain __P((void));
|
||||||
void sctp_init __P((void));
|
void sctp_init __P((void));
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -121,7 +121,6 @@ rto_logging(struct sctp_nets *net, int from)
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -142,7 +141,6 @@ sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t tsn, uint16_t sseq, uint16
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -219,7 +217,6 @@ sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn,
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -277,7 +274,6 @@ sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_rea
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -313,7 +309,6 @@ sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -358,7 +353,6 @@ sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from)
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -386,7 +380,6 @@ sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *net, int error, int b
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -441,7 +434,6 @@ sctp_log_mbcnt(uint8_t from, uint32_t total_oq, uint32_t book, uint32_t total_mb
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -454,7 +446,7 @@ sctp_misc_ints(uint8_t from, uint32_t a, uint32_t b, uint32_t c, uint32_t d)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t cumtsn, uint32_t wake_cnt, int from)
|
sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t wake_cnt, int from)
|
||||||
{
|
{
|
||||||
struct sctp_cwnd_log sctp_clog;
|
struct sctp_cwnd_log sctp_clog;
|
||||||
|
|
||||||
@ -497,11 +489,10 @@ sctp_wakeup_log(struct sctp_tcb *stcb, uint32_t cumtsn, uint32_t wake_cnt, int f
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_log_block(uint8_t from, struct socket *so, struct sctp_association *asoc, int sendlen)
|
sctp_log_block(uint8_t from, struct sctp_association *asoc, int sendlen)
|
||||||
{
|
{
|
||||||
struct sctp_cwnd_log sctp_clog;
|
struct sctp_cwnd_log sctp_clog;
|
||||||
|
|
||||||
@ -519,11 +510,10 @@ sctp_log_block(uint8_t from, struct socket *so, struct sctp_association *asoc, i
|
|||||||
sctp_clog.x.misc.log2,
|
sctp_clog.x.misc.log2,
|
||||||
sctp_clog.x.misc.log3,
|
sctp_clog.x.misc.log3,
|
||||||
sctp_clog.x.misc.log4);
|
sctp_clog.x.misc.log4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
sctp_fill_stat_log(void *optval, size_t *optsize)
|
sctp_fill_stat_log(void *optval SCTP_UNUSED, size_t *optsize SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
/* May need to fix this if ktrdump does not work */
|
/* May need to fix this if ktrdump does not work */
|
||||||
return (0);
|
return (0);
|
||||||
@ -800,7 +790,7 @@ sctp_get_prev_mtu(uint32_t val)
|
|||||||
* entry, just return val.
|
* entry, just return val.
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
sctp_get_next_mtu(struct sctp_inpcb *inp, uint32_t val)
|
sctp_get_next_mtu(uint32_t val)
|
||||||
{
|
{
|
||||||
/* select another MTU that is just bigger than this one */
|
/* select another MTU that is just bigger than this one */
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
@ -871,21 +861,22 @@ sctp_select_initial_TSN(struct sctp_pcb *inp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int save_in_twait)
|
sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int check)
|
||||||
{
|
{
|
||||||
uint32_t x, not_done;
|
uint32_t x;
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
|
||||||
(void)SCTP_GETTIME_TIMEVAL(&now);
|
if (check) {
|
||||||
not_done = 1;
|
(void)SCTP_GETTIME_TIMEVAL(&now);
|
||||||
while (not_done) {
|
}
|
||||||
|
for (;;) {
|
||||||
x = sctp_select_initial_TSN(&inp->sctp_ep);
|
x = sctp_select_initial_TSN(&inp->sctp_ep);
|
||||||
if (x == 0) {
|
if (x == 0) {
|
||||||
/* we never use 0 */
|
/* we never use 0 */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (sctp_is_vtag_good(inp, x, lport, rport, &now, save_in_twait)) {
|
if (!check || sctp_is_vtag_good(x, lport, rport, &now)) {
|
||||||
not_done = 0;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (x);
|
return (x);
|
||||||
@ -2612,7 +2603,7 @@ sctp_pad_lastmbuf(struct mbuf *m, int padval, struct mbuf *last_mbuf)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb,
|
sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb,
|
||||||
uint32_t error, void *data, int so_locked
|
uint32_t error, int so_locked
|
||||||
#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
|
#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
|
||||||
SCTP_UNUSED
|
SCTP_UNUSED
|
||||||
#endif
|
#endif
|
||||||
@ -2688,7 +2679,7 @@ sctp_notify_assoc_change(uint32_t event, struct sctp_tcb *stcb,
|
|||||||
SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_assoc_change);
|
SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_assoc_change);
|
||||||
SCTP_BUF_NEXT(m_notify) = NULL;
|
SCTP_BUF_NEXT(m_notify) = NULL;
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -2787,7 +2778,7 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state,
|
|||||||
|
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -2873,7 +2864,7 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint32_t error,
|
|||||||
}
|
}
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -2949,7 +2940,7 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error,
|
|||||||
}
|
}
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -2965,8 +2956,7 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sctp_notify_adaptation_layer(struct sctp_tcb *stcb,
|
sctp_notify_adaptation_layer(struct sctp_tcb *stcb)
|
||||||
uint32_t error)
|
|
||||||
{
|
{
|
||||||
struct mbuf *m_notify;
|
struct mbuf *m_notify;
|
||||||
struct sctp_adaptation_event *sai;
|
struct sctp_adaptation_event *sai;
|
||||||
@ -2993,7 +2983,7 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb,
|
|||||||
|
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -3047,7 +3037,7 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error,
|
|||||||
SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_pdapi_event);
|
SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_pdapi_event);
|
||||||
SCTP_BUF_NEXT(m_notify) = NULL;
|
SCTP_BUF_NEXT(m_notify) = NULL;
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -3155,7 +3145,7 @@ sctp_notify_shutdown_event(struct sctp_tcb *stcb)
|
|||||||
|
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -3204,7 +3194,8 @@ sctp_notify_sender_dry_event(struct sctp_tcb *stcb,
|
|||||||
|
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0, m_notify);
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
sctp_m_freem(m_notify);
|
sctp_m_freem(m_notify);
|
||||||
@ -3258,7 +3249,7 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, int number_entries, int flag
|
|||||||
}
|
}
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -3324,7 +3315,7 @@ sctp_notify_stream_reset(struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
/* append to socket */
|
/* append to socket */
|
||||||
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
|
||||||
0, 0, 0, 0, 0, 0,
|
0, 0, stcb->asoc.context, 0, 0, 0,
|
||||||
m_notify);
|
m_notify);
|
||||||
if (control == NULL) {
|
if (control == NULL) {
|
||||||
/* no memory */
|
/* no memory */
|
||||||
@ -3371,11 +3362,11 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
|
|||||||
switch (notification) {
|
switch (notification) {
|
||||||
case SCTP_NOTIFY_ASSOC_UP:
|
case SCTP_NOTIFY_ASSOC_UP:
|
||||||
if (stcb->asoc.assoc_up_sent == 0) {
|
if (stcb->asoc.assoc_up_sent == 0) {
|
||||||
sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, so_locked);
|
sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, so_locked);
|
||||||
stcb->asoc.assoc_up_sent = 1;
|
stcb->asoc.assoc_up_sent = 1;
|
||||||
}
|
}
|
||||||
if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) {
|
if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) {
|
||||||
sctp_notify_adaptation_layer(stcb, error);
|
sctp_notify_adaptation_layer(stcb);
|
||||||
}
|
}
|
||||||
if (stcb->asoc.peer_supports_auth == 0) {
|
if (stcb->asoc.peer_supports_auth == 0) {
|
||||||
sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0,
|
sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0,
|
||||||
@ -3383,7 +3374,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCTP_NOTIFY_ASSOC_DOWN:
|
case SCTP_NOTIFY_ASSOC_DOWN:
|
||||||
sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, so_locked);
|
sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, so_locked);
|
||||||
break;
|
break;
|
||||||
case SCTP_NOTIFY_INTERFACE_DOWN:
|
case SCTP_NOTIFY_INTERFACE_DOWN:
|
||||||
{
|
{
|
||||||
@ -3434,9 +3425,9 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
|
|||||||
case SCTP_NOTIFY_ASSOC_ABORTED:
|
case SCTP_NOTIFY_ASSOC_ABORTED:
|
||||||
if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) ||
|
if ((stcb) && (((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_WAIT) ||
|
||||||
((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) {
|
((stcb->asoc.state & SCTP_STATE_MASK) == SCTP_STATE_COOKIE_ECHOED))) {
|
||||||
sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, NULL, so_locked);
|
sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, so_locked);
|
||||||
} else {
|
} else {
|
||||||
sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, NULL, so_locked);
|
sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, so_locked);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SCTP_NOTIFY_PEER_OPENED_STREAM:
|
case SCTP_NOTIFY_PEER_OPENED_STREAM:
|
||||||
@ -3444,7 +3435,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
|
|||||||
case SCTP_NOTIFY_STREAM_OPENED_OK:
|
case SCTP_NOTIFY_STREAM_OPENED_OK:
|
||||||
break;
|
break;
|
||||||
case SCTP_NOTIFY_ASSOC_RESTART:
|
case SCTP_NOTIFY_ASSOC_RESTART:
|
||||||
sctp_notify_assoc_change(SCTP_RESTART, stcb, error, data, so_locked);
|
sctp_notify_assoc_change(SCTP_RESTART, stcb, error, so_locked);
|
||||||
if (stcb->asoc.peer_supports_auth == 0) {
|
if (stcb->asoc.peer_supports_auth == 0) {
|
||||||
sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0,
|
sctp_ulp_notify(SCTP_NOTIFY_NO_PEER_AUTH, stcb, 0,
|
||||||
NULL, so_locked);
|
NULL, so_locked);
|
||||||
@ -3848,7 +3839,7 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
|
|||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
case SCTP_SHUTDOWN_ACK:
|
case SCTP_SHUTDOWN_ACK:
|
||||||
sctp_send_shutdown_complete2(m, iphlen, sh, vrf_id, port);
|
sctp_send_shutdown_complete2(m, sh, vrf_id, port);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -6353,7 +6344,7 @@ sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp,
|
|||||||
* assumes all arguments are valid/checked by caller.
|
* assumes all arguments are valid/checked by caller.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
sctp_bindx_delete_address(struct socket *so, struct sctp_inpcb *inp,
|
sctp_bindx_delete_address(struct sctp_inpcb *inp,
|
||||||
struct sockaddr *sa, sctp_assoc_t assoc_id,
|
struct sockaddr *sa, sctp_assoc_t assoc_id,
|
||||||
uint32_t vrf_id, int *error)
|
uint32_t vrf_id, int *error)
|
||||||
{
|
{
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -127,7 +127,7 @@ sctp_append_to_readq(struct sctp_inpcb *inp,
|
|||||||
void sctp_iterator_worker(void);
|
void sctp_iterator_worker(void);
|
||||||
|
|
||||||
uint32_t sctp_get_prev_mtu(uint32_t);
|
uint32_t sctp_get_prev_mtu(uint32_t);
|
||||||
uint32_t sctp_get_next_mtu(struct sctp_inpcb *, uint32_t);
|
uint32_t sctp_get_next_mtu(uint32_t);
|
||||||
|
|
||||||
void
|
void
|
||||||
sctp_timeout_handler(void *);
|
sctp_timeout_handler(void *);
|
||||||
@ -250,7 +250,7 @@ sctp_bindx_add_address(struct socket *so, struct sctp_inpcb *inp,
|
|||||||
struct sockaddr *sa, sctp_assoc_t assoc_id,
|
struct sockaddr *sa, sctp_assoc_t assoc_id,
|
||||||
uint32_t vrf_id, int *error, void *p);
|
uint32_t vrf_id, int *error, void *p);
|
||||||
void
|
void
|
||||||
sctp_bindx_delete_address(struct socket *so, struct sctp_inpcb *inp,
|
sctp_bindx_delete_address(struct sctp_inpcb *inp,
|
||||||
struct sockaddr *sa, sctp_assoc_t assoc_id,
|
struct sockaddr *sa, sctp_assoc_t assoc_id,
|
||||||
uint32_t vrf_id, int *error);
|
uint32_t vrf_id, int *error);
|
||||||
|
|
||||||
@ -333,7 +333,6 @@ void
|
|||||||
|
|
||||||
void
|
void
|
||||||
sctp_wakeup_log(struct sctp_tcb *stcb,
|
sctp_wakeup_log(struct sctp_tcb *stcb,
|
||||||
uint32_t cumtsn,
|
|
||||||
uint32_t wake_cnt, int from);
|
uint32_t wake_cnt, int from);
|
||||||
|
|
||||||
void sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t, uint16_t, uint16_t, int);
|
void sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t, uint16_t, uint16_t, int);
|
||||||
@ -359,7 +358,7 @@ void sctp_log_closing(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int16_t loc
|
|||||||
|
|
||||||
void sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from);
|
void sctp_log_lock(struct sctp_inpcb *inp, struct sctp_tcb *stcb, uint8_t from);
|
||||||
void sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *, int, int, uint8_t);
|
void sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *, int, int, uint8_t);
|
||||||
void sctp_log_block(uint8_t, struct socket *, struct sctp_association *, int);
|
void sctp_log_block(uint8_t, struct sctp_association *, int);
|
||||||
void sctp_log_rwnd(uint8_t, uint32_t, uint32_t, uint32_t);
|
void sctp_log_rwnd(uint8_t, uint32_t, uint32_t, uint32_t);
|
||||||
void sctp_log_mbcnt(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
void sctp_log_mbcnt(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||||
void sctp_log_rwnd_set(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
void sctp_log_rwnd_set(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
@ -162,11 +162,11 @@ sctp6_input(struct mbuf **i_pak, int *offp, int proto)
|
|||||||
if (calc_check != check) {
|
if (calc_check != check) {
|
||||||
SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p phlen:%d\n",
|
SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x m:%p phlen:%d\n",
|
||||||
calc_check, check, m, iphlen);
|
calc_check, check, m, iphlen);
|
||||||
stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch),
|
stcb = sctp_findassociation_addr(m, offset - sizeof(*ch),
|
||||||
sh, ch, &in6p, &net, vrf_id);
|
sh, ch, &in6p, &net, vrf_id);
|
||||||
if ((net) && (port)) {
|
if ((net) && (port)) {
|
||||||
if (net->port == 0) {
|
if (net->port == 0) {
|
||||||
sctp_pathmtu_adjustment(in6p, stcb, net, net->mtu - sizeof(struct udphdr));
|
sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
|
||||||
}
|
}
|
||||||
net->port = port;
|
net->port = port;
|
||||||
}
|
}
|
||||||
@ -196,11 +196,11 @@ sctp6_input(struct mbuf **i_pak, int *offp, int proto)
|
|||||||
* Locate pcb and tcb for datagram sctp_findassociation_addr() wants
|
* Locate pcb and tcb for datagram sctp_findassociation_addr() wants
|
||||||
* IP/SCTP/first chunk header...
|
* IP/SCTP/first chunk header...
|
||||||
*/
|
*/
|
||||||
stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch),
|
stcb = sctp_findassociation_addr(m, offset - sizeof(*ch),
|
||||||
sh, ch, &in6p, &net, vrf_id);
|
sh, ch, &in6p, &net, vrf_id);
|
||||||
if ((net) && (port)) {
|
if ((net) && (port)) {
|
||||||
if (net->port == 0) {
|
if (net->port == 0) {
|
||||||
sctp_pathmtu_adjustment(in6p, stcb, net, net->mtu - sizeof(struct udphdr));
|
sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr));
|
||||||
}
|
}
|
||||||
net->port = port;
|
net->port = port;
|
||||||
}
|
}
|
||||||
@ -230,7 +230,7 @@ sctp6_input(struct mbuf **i_pak, int *offp, int proto)
|
|||||||
sh->v_tag = 0;
|
sh->v_tag = 0;
|
||||||
}
|
}
|
||||||
if (ch->chunk_type == SCTP_SHUTDOWN_ACK) {
|
if (ch->chunk_type == SCTP_SHUTDOWN_ACK) {
|
||||||
sctp_send_shutdown_complete2(m, iphlen, sh, vrf_id, port);
|
sctp_send_shutdown_complete2(m, sh, vrf_id, port);
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) {
|
if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) {
|
||||||
@ -663,7 +663,7 @@ sctp6_abort(struct socket *so)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
sctp6_attach(struct socket *so, int proto, struct thread *p)
|
sctp6_attach(struct socket *so, int proto SCTP_UNUSED, struct thread *p SCTP_UNUSED)
|
||||||
{
|
{
|
||||||
struct in6pcb *inp6;
|
struct in6pcb *inp6;
|
||||||
int error;
|
int error;
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* a) Redistributions of source code must retain the above copyright notice,
|
* a) Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* b) Redistributions in binary form must reproduce the above copyright
|
* b) Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* notice, this list of conditions and the following disclaimer in
|
||||||
* the documentation and/or other materials provided with the distribution.
|
* the documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
* c) Neither the name of Cisco Systems, Inc. nor the names of its
|
||||||
* contributors may be used to endorse or promote products derived
|
* contributors may be used to endorse or promote products derived
|
||||||
|
Loading…
Reference in New Issue
Block a user