Whitespace changes.
The toolchain for processing the sources has been updated. No functional change. MFC after: 3 days
This commit is contained in:
parent
a11bac7379
commit
b7b84c0e02
@ -2419,8 +2419,10 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sctp_ifa *sctp_ifa)
|
||||
}
|
||||
}
|
||||
|
||||
/* we want to find the sequences which consist of ADD -> DEL -> ADD
|
||||
* or DEL -> ADD */
|
||||
/*
|
||||
* we want to find the sequences which consist of ADD -> DEL -> ADD
|
||||
* or DEL -> ADD
|
||||
*/
|
||||
if (add_cnt > del_cnt ||
|
||||
(add_cnt == del_cnt && last_param_type == SCTP_ADD_IP_ADDRESS)) {
|
||||
return (1);
|
||||
@ -2472,8 +2474,10 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int addr_locked)
|
||||
if (sctp_is_addr_restricted(stcb, sctp_ifa) &&
|
||||
(!sctp_is_addr_pending(stcb, sctp_ifa)))
|
||||
continue;
|
||||
/* found a valid local v4 address to
|
||||
* use */
|
||||
/*
|
||||
* found a valid local v4 address to
|
||||
* use
|
||||
*/
|
||||
if (addr_locked == SCTP_ADDR_NOT_LOCKED)
|
||||
SCTP_IPI_ADDR_RUNLOCK();
|
||||
return (&sctp_ifa->address.sa);
|
||||
@ -2490,8 +2494,10 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int addr_locked)
|
||||
}
|
||||
sin6 = &sctp_ifa->address.sin6;
|
||||
if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
|
||||
/* we skip unspecifed
|
||||
* addresses */
|
||||
/*
|
||||
* we skip unspecifed
|
||||
* addresses
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
if (prison_check_ip6(stcb->sctp_ep->ip_inp.inp.inp_cred,
|
||||
@ -2508,8 +2514,10 @@ sctp_find_valid_localaddr(struct sctp_tcb *stcb, int addr_locked)
|
||||
if (sctp_is_addr_restricted(stcb, sctp_ifa) &&
|
||||
(!sctp_is_addr_pending(stcb, sctp_ifa)))
|
||||
continue;
|
||||
/* found a valid local v6 address to
|
||||
* use */
|
||||
/*
|
||||
* found a valid local v6 address to
|
||||
* use
|
||||
*/
|
||||
if (addr_locked == SCTP_ADDR_NOT_LOCKED)
|
||||
SCTP_IPI_ADDR_RUNLOCK();
|
||||
return (&sctp_ifa->address.sa);
|
||||
|
@ -160,13 +160,17 @@ sctp_cwnd_update_after_fr(struct sctp_tcb *stcb,
|
||||
uint32_t srtt;
|
||||
|
||||
srtt = net->lastsa;
|
||||
/* lastsa>>3; we don't need
|
||||
* to devide ... */
|
||||
/*
|
||||
* lastsa>>3; we don't need
|
||||
* to devide ...
|
||||
*/
|
||||
if (srtt == 0) {
|
||||
srtt = 1;
|
||||
}
|
||||
/* Short Version => Equal to
|
||||
* Contel Version MBe */
|
||||
/*
|
||||
* Short Version => Equal to
|
||||
* Contel Version MBe
|
||||
*/
|
||||
net->ssthresh = (uint32_t)(((uint64_t)4 *
|
||||
(uint64_t)net->mtu *
|
||||
(uint64_t)net->cwnd) /
|
||||
@ -401,8 +405,10 @@ cc_bw_decrease(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint6
|
||||
net->flight_size,
|
||||
probepoint);
|
||||
if (net->cc_mod.rtcc.ret_from_eq) {
|
||||
/* Switch over to CA if we are less
|
||||
* aggressive */
|
||||
/*
|
||||
* Switch over to CA if we are less
|
||||
* aggressive
|
||||
*/
|
||||
net->ssthresh = net->cwnd - 1;
|
||||
net->partial_bytes_acked = 0;
|
||||
}
|
||||
@ -845,8 +851,10 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
|
||||
}
|
||||
break;
|
||||
case SCTP_CMT_RPV2:
|
||||
/* lastsa>>3; we don't need
|
||||
* to divide ... */
|
||||
/*
|
||||
* lastsa>>3; we don't need
|
||||
* to divide ...
|
||||
*/
|
||||
srtt = net->lastsa;
|
||||
if (srtt == 0) {
|
||||
srtt = 1;
|
||||
@ -930,8 +938,10 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
|
||||
}
|
||||
break;
|
||||
case SCTP_CMT_RPV2:
|
||||
/* lastsa>>3; we don't need
|
||||
* to divide ... */
|
||||
/*
|
||||
* lastsa>>3; we don't need
|
||||
* to divide ...
|
||||
*/
|
||||
srtt = net->lastsa;
|
||||
if (srtt == 0) {
|
||||
srtt = 1;
|
||||
@ -1098,8 +1108,10 @@ sctp_cwnd_update_after_ecn_echo_common(struct sctp_tcb *stcb, struct sctp_nets *
|
||||
sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT);
|
||||
}
|
||||
} else {
|
||||
/* Further tuning down required over the drastic
|
||||
* original cut */
|
||||
/*
|
||||
* Further tuning down required over the drastic
|
||||
* original cut
|
||||
*/
|
||||
net->ssthresh -= (net->mtu * num_pkt_lost);
|
||||
net->cwnd -= (net->mtu * num_pkt_lost);
|
||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
|
||||
@ -1113,8 +1125,10 @@ sctp_cwnd_update_after_ecn_echo_common(struct sctp_tcb *stcb, struct sctp_nets *
|
||||
net->ssthresh = net->cwnd / 2;
|
||||
if (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
|
||||
*/
|
||||
net->RTO <<= 1;
|
||||
}
|
||||
net->cwnd = net->ssthresh;
|
||||
@ -1361,8 +1375,10 @@ sctp_cwnd_new_rtcc_transmission_begins(struct sctp_tcb *stcb,
|
||||
|
||||
cwnd_in_mtu = SCTP_BASE_SYSCTL(sctp_initial_cwnd);
|
||||
if (cwnd_in_mtu == 0) {
|
||||
/* Using 0 means that the value of RFC 4960
|
||||
* is used. */
|
||||
/*
|
||||
* Using 0 means that the value of RFC 4960
|
||||
* is used.
|
||||
*/
|
||||
cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
|
||||
} else {
|
||||
/*
|
||||
@ -1374,8 +1390,10 @@ sctp_cwnd_new_rtcc_transmission_begins(struct sctp_tcb *stcb,
|
||||
cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu;
|
||||
}
|
||||
if (net->cwnd > cwnd) {
|
||||
/* Only set if we are not a timeout (i.e.
|
||||
* down to 1 mtu) */
|
||||
/*
|
||||
* Only set if we are not a timeout (i.e.
|
||||
* down to 1 mtu)
|
||||
*/
|
||||
net->cwnd = cwnd;
|
||||
}
|
||||
}
|
||||
@ -2005,8 +2023,10 @@ htcp_param_update(struct sctp_nets *net)
|
||||
htcp_beta_update(&net->cc_mod.htcp_ca, minRTT, maxRTT);
|
||||
htcp_alpha_update(&net->cc_mod.htcp_ca);
|
||||
|
||||
/* add slowly fading memory for maxRTT to accommodate routing
|
||||
* changes etc */
|
||||
/*
|
||||
* add slowly fading memory for maxRTT to accommodate routing
|
||||
* changes etc
|
||||
*/
|
||||
if (minRTT > 0 && maxRTT > minRTT)
|
||||
net->cc_mod.htcp_ca.maxRTT = minRTT + ((maxRTT - minRTT) * 95) / 100;
|
||||
}
|
||||
|
@ -341,8 +341,10 @@ sctp_place_control_in_stream(struct sctp_stream_in *strm,
|
||||
q = &strm->uno_inqueue;
|
||||
if (asoc->idata_supported == 0) {
|
||||
if (!TAILQ_EMPTY(q)) {
|
||||
/* Only one stream can be here in old style
|
||||
* -- abort */
|
||||
/*
|
||||
* Only one stream can be here in old style
|
||||
* -- abort
|
||||
*/
|
||||
return (-1);
|
||||
}
|
||||
TAILQ_INSERT_TAIL(q, control, next_instrm);
|
||||
@ -832,8 +834,10 @@ restart:
|
||||
TAILQ_INSERT_TAIL(&nc->reasm, tchk, sctp_next);
|
||||
tchk = TAILQ_FIRST(&control->reasm);
|
||||
}
|
||||
/* Now lets add it to the queue
|
||||
* after removing control */
|
||||
/*
|
||||
* Now lets add it to the queue
|
||||
* after removing control
|
||||
*/
|
||||
TAILQ_INSERT_TAIL(&strm->uno_inqueue, nc, next_instrm);
|
||||
nc->on_strm_q = SCTP_ON_UNORDERED;
|
||||
if (control->on_strm_q) {
|
||||
@ -857,8 +861,10 @@ restart:
|
||||
}
|
||||
sctp_wakeup_the_read_socket(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED);
|
||||
if ((nc->first_frag_seen) && !TAILQ_EMPTY(&nc->reasm)) {
|
||||
/* Switch to the new guy and
|
||||
* continue */
|
||||
/*
|
||||
* Switch to the new guy and
|
||||
* continue
|
||||
*/
|
||||
control = nc;
|
||||
goto restart;
|
||||
} else {
|
||||
@ -918,8 +924,10 @@ sctp_inject_old_unordered_data(struct sctp_tcb *stcb,
|
||||
uint32_t tmp;
|
||||
|
||||
if (SCTP_TSN_GT(chk->rec.data.fsn, control->fsn_included)) {
|
||||
/* Easy way the start of a new guy beyond
|
||||
* the lowest */
|
||||
/*
|
||||
* Easy way the start of a new guy beyond
|
||||
* the lowest
|
||||
*/
|
||||
goto place_chunk;
|
||||
}
|
||||
if ((chk->rec.data.fsn == control->fsn_included) ||
|
||||
@ -1135,8 +1143,10 @@ done_un:
|
||||
}
|
||||
}
|
||||
if (strm->pd_api_started) {
|
||||
/* Can't add more must have gotten an un-ordered above being
|
||||
* partially delivered. */
|
||||
/*
|
||||
* Can't add more must have gotten an un-ordered above being
|
||||
* partially delivered.
|
||||
*/
|
||||
return (0);
|
||||
}
|
||||
deliver_more:
|
||||
@ -1168,15 +1178,21 @@ deliver_more:
|
||||
ret++;
|
||||
}
|
||||
if (((control->sinfo_flags >> 8) & SCTP_DATA_NOT_FRAG) == SCTP_DATA_NOT_FRAG) {
|
||||
/* A singleton now slipping through - mark
|
||||
* it non-revokable too */
|
||||
/*
|
||||
* A singleton now slipping through - mark
|
||||
* it non-revokable too
|
||||
*/
|
||||
sctp_mark_non_revokable(asoc, control->sinfo_tsn);
|
||||
} else if (control->end_added == 0) {
|
||||
/* Check if we can defer adding until its
|
||||
* all there */
|
||||
/*
|
||||
* Check if we can defer adding until its
|
||||
* all there
|
||||
*/
|
||||
if ((control->length < pd_point) || (strm->pd_api_started)) {
|
||||
/* Don't need it or cannot add more
|
||||
* (one being delivered that way) */
|
||||
/*
|
||||
* Don't need it or cannot add more
|
||||
* (one being delivered that way)
|
||||
*/
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
@ -1383,8 +1399,10 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
* we know the first FSN (which is the TSN).
|
||||
*/
|
||||
if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn)) {
|
||||
/* We have already delivered up to
|
||||
* this so its a dup */
|
||||
/*
|
||||
* We have already delivered up to
|
||||
* this so its a dup
|
||||
*/
|
||||
sctp_abort_in_reasm(stcb, control, chk,
|
||||
abort_flag,
|
||||
SCTP_FROM_SCTP_INDATA + SCTP_LOC_9);
|
||||
@ -1411,8 +1429,10 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
*/
|
||||
|
||||
if (SCTP_TSN_GE(control->fsn_included, chk->rec.data.fsn)) {
|
||||
/* We have already delivered up to
|
||||
* this so its a dup */
|
||||
/*
|
||||
* We have already delivered up to
|
||||
* this so its a dup
|
||||
*/
|
||||
SCTPDBG(SCTP_DEBUG_XXX,
|
||||
"New fsn: %u is already seen in included_fsn: %u -- abort\n",
|
||||
chk->rec.data.fsn, control->fsn_included);
|
||||
@ -1422,8 +1442,10 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* validate not beyond top FSN if we have seen last
|
||||
* one */
|
||||
/*
|
||||
* validate not beyond top FSN if we have seen last
|
||||
* one
|
||||
*/
|
||||
if (SCTP_TSN_GT(chk->rec.data.fsn, control->top_fsn)) {
|
||||
SCTPDBG(SCTP_DEBUG_XXX,
|
||||
"New fsn: %u is beyond or at top_fsn: %u -- abort\n",
|
||||
@ -1457,8 +1479,10 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
inserted = 1;
|
||||
break;
|
||||
} else if (at->rec.data.fsn == chk->rec.data.fsn) {
|
||||
/* Gak, He sent me a duplicate str seq
|
||||
* number */
|
||||
/*
|
||||
* Gak, He sent me a duplicate str seq
|
||||
* number
|
||||
*/
|
||||
/*
|
||||
* foo bar, I guess I will just free this
|
||||
* new guy, should we abort too? FIX ME
|
||||
@ -1763,15 +1787,19 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
return (0);
|
||||
}
|
||||
if (ordered && ((control->sinfo_flags >> 8) & SCTP_DATA_UNORDERED)) {
|
||||
/* We can't have a switched order with an
|
||||
* unordered chunk */
|
||||
/*
|
||||
* We can't have a switched order with an
|
||||
* unordered chunk
|
||||
*/
|
||||
snprintf(msg, sizeof(msg), "All fragments of a user message must be ordered or unordered (TSN=%8.8x)",
|
||||
tsn);
|
||||
goto err_out;
|
||||
}
|
||||
if (!ordered && (((control->sinfo_flags >> 8) & SCTP_DATA_UNORDERED) == 0)) {
|
||||
/* We can't have a switched unordered with a
|
||||
* ordered chunk */
|
||||
/*
|
||||
* We can't have a switched unordered with a
|
||||
* ordered chunk
|
||||
*/
|
||||
snprintf(msg, sizeof(msg), "All fragments of a user message must be ordered or unordered (TSN=%8.8x)",
|
||||
tsn);
|
||||
goto err_out;
|
||||
@ -2488,7 +2516,8 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap)
|
||||
(stcb->asoc.numduptsns) || /* we have dup's */
|
||||
(is_a_gap) || /* is still a gap */
|
||||
(stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */
|
||||
(stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */ ) {
|
||||
(stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */
|
||||
) {
|
||||
|
||||
if ((stcb->asoc.sctp_cmt_on_off > 0) &&
|
||||
(SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) &&
|
||||
@ -2751,7 +2780,8 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
|
||||
/* discard the rest of this packet */
|
||||
stop_proc = 1;
|
||||
} /* else skip this bad chunk and
|
||||
* continue... */ break;
|
||||
* continue... */
|
||||
break;
|
||||
} /* switch of chunk type */
|
||||
}
|
||||
*offset += SCTP_SIZE32(chk_length);
|
||||
@ -3008,8 +3038,10 @@ sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1
|
||||
}
|
||||
tp1->sent = SCTP_DATAGRAM_NR_ACKED;
|
||||
if (tp1->data) {
|
||||
/* sa_ignore
|
||||
* NO_NULL_CHK */
|
||||
/*
|
||||
* sa_ignore
|
||||
* NO_NULL_CHK
|
||||
*/
|
||||
sctp_free_bufspace(stcb, &stcb->asoc, tp1, 1);
|
||||
sctp_m_freem(tp1->data);
|
||||
tp1->data = NULL;
|
||||
@ -3018,7 +3050,8 @@ sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1
|
||||
}
|
||||
}
|
||||
break;
|
||||
} /* if (tp1->tsn == theTSN) */ if (SCTP_TSN_GT(tp1->rec.data.tsn, theTSN)) {
|
||||
} /* if (tp1->tsn == theTSN) */
|
||||
if (SCTP_TSN_GT(tp1->rec.data.tsn, theTSN)) {
|
||||
break;
|
||||
}
|
||||
tp1 = TAILQ_NEXT(tp1, sctp_next);
|
||||
@ -3469,8 +3502,10 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
|
||||
if ((stcb->asoc.prsctp_supported) &&
|
||||
(PR_SCTP_RTX_ENABLED(tp1->flags))) {
|
||||
/* Has it been retransmitted tv_sec times? -
|
||||
* we store the retran count there. */
|
||||
/*
|
||||
* Has it been retransmitted tv_sec times? -
|
||||
* we store the retran count there.
|
||||
*/
|
||||
if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) {
|
||||
/* Yes, so drop it */
|
||||
if (tp1->data != NULL) {
|
||||
@ -3482,8 +3517,10 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
continue;
|
||||
}
|
||||
}
|
||||
/* SCTP_PRINTF("OK, we are now ready to FR this
|
||||
* guy\n"); */
|
||||
/*
|
||||
* SCTP_PRINTF("OK, we are now ready to FR this
|
||||
* guy\n");
|
||||
*/
|
||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) {
|
||||
sctp_log_fr(tp1->rec.data.tsn, tp1->snd_count,
|
||||
0, SCTP_FR_MARKED);
|
||||
@ -3503,14 +3540,18 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
alt = tp1->whoTo;
|
||||
/* sa_ignore NO_NULL_CHK */
|
||||
if (asoc->sctp_cmt_pf > 0) {
|
||||
/* JRS 5/18/07 - If CMT PF is on,
|
||||
/*
|
||||
* JRS 5/18/07 - If CMT PF is on,
|
||||
* use the PF version of
|
||||
* find_alt_net() */
|
||||
* find_alt_net()
|
||||
*/
|
||||
alt = sctp_find_alternate_net(stcb, alt, 2);
|
||||
} else {
|
||||
/* JRS 5/18/07 - If only CMT is on,
|
||||
/*
|
||||
* JRS 5/18/07 - If only CMT is on,
|
||||
* use the CMT version of
|
||||
* find_alt_net() */
|
||||
* find_alt_net()
|
||||
*/
|
||||
/* sa_ignore NO_NULL_CHK */
|
||||
alt = sctp_find_alternate_net(stcb, alt, 1);
|
||||
}
|
||||
@ -4041,8 +4082,10 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
|
||||
}
|
||||
if (net == stcb->asoc.primary_destination) {
|
||||
if (stcb->asoc.alternate) {
|
||||
/* release the alternate,
|
||||
* primary is good */
|
||||
/*
|
||||
* release the alternate,
|
||||
* primary is good
|
||||
*/
|
||||
sctp_free_remote_addr(stcb->asoc.alternate);
|
||||
stcb->asoc.alternate = NULL;
|
||||
}
|
||||
@ -4125,8 +4168,10 @@ again:
|
||||
}
|
||||
} else {
|
||||
if (net->window_probe) {
|
||||
/* In window probes we must assure a timer
|
||||
* is still running there */
|
||||
/*
|
||||
* In window probes we must assure a timer
|
||||
* is still running there
|
||||
*/
|
||||
net->window_probe = 0;
|
||||
if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
|
||||
SCTP_OS_TIMER_START(&net->rxt_timer.timer, to_ticks,
|
||||
@ -4811,8 +4856,10 @@ hopeless_peer:
|
||||
}
|
||||
if (net == stcb->asoc.primary_destination) {
|
||||
if (stcb->asoc.alternate) {
|
||||
/* release the alternate,
|
||||
* primary is good */
|
||||
/*
|
||||
* release the alternate,
|
||||
* primary is good
|
||||
*/
|
||||
sctp_free_remote_addr(stcb->asoc.alternate);
|
||||
stcb->asoc.alternate = NULL;
|
||||
}
|
||||
@ -5023,8 +5070,10 @@ again:
|
||||
}
|
||||
} else {
|
||||
if (net->window_probe) {
|
||||
/* In window probes we must assure a timer
|
||||
* is still running there */
|
||||
/*
|
||||
* In window probes we must assure a timer
|
||||
* is still running there
|
||||
*/
|
||||
if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SEND,
|
||||
stcb->sctp_ep, stcb, net);
|
||||
@ -5175,8 +5224,10 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
|
||||
} else {
|
||||
/* Its a fragmented message */
|
||||
if (ctl->first_frag_seen) {
|
||||
/* Make it so this is next to
|
||||
* deliver, we restore later */
|
||||
/*
|
||||
* Make it so this is next to
|
||||
* deliver, we restore later
|
||||
*/
|
||||
strmin->last_mid_delivered = ctl->mid - 1;
|
||||
need_reasm_check = 1;
|
||||
break;
|
||||
@ -5240,8 +5291,10 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
|
||||
} else {
|
||||
/* Its a fragmented message */
|
||||
if (ctl->first_frag_seen) {
|
||||
/* Make it so this is next to
|
||||
* deliver */
|
||||
/*
|
||||
* Make it so this is next to
|
||||
* deliver
|
||||
*/
|
||||
strmin->last_mid_delivered = ctl->mid - 1;
|
||||
need_reasm_check = 1;
|
||||
break;
|
||||
|
@ -707,8 +707,10 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb)
|
||||
LIST_REMOVE(stcb, sctp_asocs);
|
||||
stcb->asoc.my_vtag = sctp_select_a_tag(stcb->sctp_ep, stcb->sctp_ep->sctp_lport, stcb->rport, 1);
|
||||
head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(stcb->asoc.my_vtag, SCTP_BASE_INFO(hashasocmark))];
|
||||
/* put it in the bucket in the vtag hash of assoc's for the
|
||||
* system */
|
||||
/*
|
||||
* put it in the bucket in the vtag hash of assoc's for the
|
||||
* system
|
||||
*/
|
||||
LIST_INSERT_HEAD(head, stcb, sctp_asocs);
|
||||
sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED);
|
||||
return (1);
|
||||
@ -726,8 +728,10 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb)
|
||||
sctp_toss_old_cookies(stcb, &stcb->asoc);
|
||||
stcb->asoc.my_vtag = sctp_select_a_tag(stcb->sctp_ep, stcb->sctp_ep->sctp_lport, stcb->rport, 1);
|
||||
head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(stcb->asoc.my_vtag, SCTP_BASE_INFO(hashasocmark))];
|
||||
/* put it in the bucket in the vtag hash of assoc's for the
|
||||
* system */
|
||||
/*
|
||||
* put it in the bucket in the vtag hash of assoc's for the
|
||||
* system
|
||||
*/
|
||||
LIST_INSERT_HEAD(head, stcb, sctp_asocs);
|
||||
sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED);
|
||||
return (1);
|
||||
@ -937,8 +941,10 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
|
||||
(SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT)) {
|
||||
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_RECEIVED);
|
||||
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
|
||||
/* notify upper layer that peer has initiated a
|
||||
* shutdown */
|
||||
/*
|
||||
* notify upper layer that peer has initiated a
|
||||
* shutdown
|
||||
*/
|
||||
sctp_ulp_notify(SCTP_NOTIFY_PEER_SHUTDOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
|
||||
|
||||
/* reset time */
|
||||
@ -2861,8 +2867,10 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
||||
sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED,
|
||||
(*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED);
|
||||
}
|
||||
/* Pull it from the incomplete queue and wake the
|
||||
* guy */
|
||||
/*
|
||||
* Pull it from the incomplete queue and wake the
|
||||
* guy
|
||||
*/
|
||||
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
|
||||
atomic_add_int(&(*stcb)->asoc.refcnt, 1);
|
||||
SCTP_TCB_UNLOCK((*stcb));
|
||||
@ -3074,8 +3082,10 @@ sctp_handle_ecn_echo(struct sctp_ecne_chunk *cp,
|
||||
}
|
||||
if (SCTP_TSN_GT(tsn, net->cwr_window_tsn) &&
|
||||
((override_bit & SCTP_CWR_REDUCE_OVERRIDE) == 0)) {
|
||||
/* JRS - Use the congestion control given in the pluggable
|
||||
* CC module */
|
||||
/*
|
||||
* JRS - Use the congestion control given in the pluggable
|
||||
* CC module
|
||||
*/
|
||||
stcb->asoc.cc_functions.sctp_cwnd_update_after_ecn_echo(stcb, net, 0, pkt_cnt);
|
||||
/*
|
||||
* We reduce once every RTT. So we will only lower cwnd at
|
||||
@ -3398,8 +3408,10 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_chunk_desc *desc,
|
||||
case SCTP_HEARTBEAT_REQUEST:
|
||||
/* resend a demand HB */
|
||||
if ((stcb->asoc.overall_error_count + 3) < stcb->asoc.max_send_times) {
|
||||
/* Only retransmit if we KNOW we wont destroy the
|
||||
* tcb */
|
||||
/*
|
||||
* Only retransmit if we KNOW we wont destroy the
|
||||
* tcb
|
||||
*/
|
||||
sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED);
|
||||
}
|
||||
break;
|
||||
@ -3640,8 +3652,10 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stcb,
|
||||
} else if (action == SCTP_STREAM_RESET_RESULT_DENIED) {
|
||||
sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_DENIED_OUT, stcb, number_entries, req_out_param->list_of_streams, SCTP_SO_NOT_LOCKED);
|
||||
} else if (action == SCTP_STREAM_RESET_RESULT_IN_PROGRESS) {
|
||||
/* Set it up so we don't stop
|
||||
* retransmitting */
|
||||
/*
|
||||
* Set it up so we don't stop
|
||||
* retransmitting
|
||||
*/
|
||||
asoc->stream_reset_outstanding++;
|
||||
stcb->asoc.str_reset_seq_out--;
|
||||
asoc->stream_reset_out_is_outstanding = 1;
|
||||
@ -4695,8 +4709,10 @@ __attribute__((noinline))
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
} /* end if !SCTP_COOKIE_ECHO *//* process all
|
||||
* control chunks... */
|
||||
} /* end if !SCTP_COOKIE_ECHO */
|
||||
/*
|
||||
* process all control chunks...
|
||||
*/
|
||||
if (((ch->chunk_type == SCTP_SELECTIVE_ACK) ||
|
||||
(ch->chunk_type == SCTP_NR_SELECTIVE_ACK) ||
|
||||
(ch->chunk_type == SCTP_HEARTBEAT_REQUEST)) &&
|
||||
@ -4990,8 +5006,10 @@ process_control_chunks:
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* EY - nr_sack: If the received chunk is an
|
||||
* nr_sack chunk */
|
||||
/*
|
||||
* EY - nr_sack: If the received chunk is an
|
||||
* nr_sack chunk
|
||||
*/
|
||||
case SCTP_NR_SELECTIVE_ACK:
|
||||
{
|
||||
struct sctp_nr_sack_chunk *nr_sack;
|
||||
@ -5609,7 +5627,8 @@ process_control_chunks:
|
||||
/* discard this packet */
|
||||
*offset = length;
|
||||
return (stcb);
|
||||
} /* else skip this bad chunk and continue... */ break;
|
||||
} /* else skip this bad chunk and continue... */
|
||||
break;
|
||||
} /* switch (ch->chunk_type) */
|
||||
|
||||
|
||||
|
@ -2138,8 +2138,10 @@ skip_count:
|
||||
cnt++;
|
||||
total_count++;
|
||||
if (cnt >= 2) {
|
||||
/* two from each
|
||||
* address */
|
||||
/*
|
||||
* two from each
|
||||
* address
|
||||
*/
|
||||
break;
|
||||
}
|
||||
if (total_count > SCTP_ADDRESS_LIMIT) {
|
||||
@ -2825,8 +2827,10 @@ sctp_select_nth_preferred_addr_from_ifn_boundall(struct sctp_ifn *ifn,
|
||||
if (fam == AF_INET6 &&
|
||||
IN6_IS_ADDR_LINKLOCAL(&sifa->address.sin6.sin6_addr) &&
|
||||
IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr)) {
|
||||
/* link-local <-> link-local must belong to the same
|
||||
* scope. */
|
||||
/*
|
||||
* link-local <-> link-local must belong to the same
|
||||
* scope.
|
||||
*/
|
||||
memcpy(&lsa6, &sifa->address.sin6, sizeof(struct sockaddr_in6));
|
||||
(void)sa6_recoverscope(&lsa6);
|
||||
if (sin6.sin6_scope_id != lsa6.sin6_scope_id) {
|
||||
@ -4264,8 +4268,10 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
||||
/* free tempy routes */
|
||||
RO_RTFREE(ro);
|
||||
} else {
|
||||
/* PMTU check versus smallest asoc MTU goes
|
||||
* here */
|
||||
/*
|
||||
* PMTU check versus smallest asoc MTU goes
|
||||
* here
|
||||
*/
|
||||
if ((ro->ro_rt != NULL) &&
|
||||
(net->ro._s_addr)) {
|
||||
uint32_t mtu;
|
||||
@ -4540,8 +4546,10 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
||||
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT3, (struct sockaddr *)sin6);
|
||||
if (net) {
|
||||
sin6 = (struct sockaddr_in6 *)&net->ro._l_addr;
|
||||
/* preserve the port and scope for link
|
||||
* local send */
|
||||
/*
|
||||
* preserve the port and scope for link
|
||||
* local send
|
||||
*/
|
||||
prev_scope = sin6->sin6_scope_id;
|
||||
prev_port = sin6->sin6_port;
|
||||
}
|
||||
@ -4607,8 +4615,10 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
||||
/* Now if we had a temp route free it */
|
||||
RO_RTFREE(ro);
|
||||
} else {
|
||||
/* PMTU check versus smallest asoc MTU goes
|
||||
* here */
|
||||
/*
|
||||
* PMTU check versus smallest asoc MTU goes
|
||||
* here
|
||||
*/
|
||||
if (ro->ro_rt == NULL) {
|
||||
/* Route was freed */
|
||||
if (net->ro._s_addr &&
|
||||
@ -5678,8 +5688,10 @@ do_a_abort:
|
||||
* show up in our scoped count.
|
||||
*/
|
||||
cnt_inits_to = 1;
|
||||
/* pull out the scope_id from
|
||||
* incoming pkt */
|
||||
/*
|
||||
* pull out the scope_id from
|
||||
* incoming pkt
|
||||
*/
|
||||
} else if (IN6_IS_ADDR_SITELOCAL(&src6->sin6_addr) ||
|
||||
IN6_IS_ADDR_SITELOCAL(&dst6->sin6_addr)) {
|
||||
/*
|
||||
@ -6435,8 +6447,10 @@ error_out:
|
||||
/* get the prepend space */
|
||||
SCTP_BUF_RESV_UF(outchain, (SCTP_FIRST_MBUF_RESV + 4));
|
||||
} else {
|
||||
/* We really should not get a NULL
|
||||
* in endofchain */
|
||||
/*
|
||||
* We really should not get a NULL
|
||||
* in endofchain
|
||||
*/
|
||||
/* find end */
|
||||
m = outchain;
|
||||
while (m) {
|
||||
@ -6448,8 +6462,10 @@ error_out:
|
||||
}
|
||||
/* sanity */
|
||||
if (*endofchain == NULL) {
|
||||
/* huh, TSNH XXX maybe we
|
||||
* should panic */
|
||||
/*
|
||||
* huh, TSNH XXX maybe we
|
||||
* should panic
|
||||
*/
|
||||
sctp_m_freem(outchain);
|
||||
goto new_mbuf;
|
||||
}
|
||||
@ -6648,13 +6664,17 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
|
||||
if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) {
|
||||
goto abort_anyway;
|
||||
}
|
||||
/* there is nothing queued to send, so I'm
|
||||
* done... */
|
||||
/*
|
||||
* there is nothing queued to send, so I'm
|
||||
* done...
|
||||
*/
|
||||
if ((SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT) &&
|
||||
(SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_RECEIVED) &&
|
||||
(SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_ACK_SENT)) {
|
||||
/* only send SHUTDOWN the first time
|
||||
* through */
|
||||
/*
|
||||
* only send SHUTDOWN the first time
|
||||
* through
|
||||
*/
|
||||
if (SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) {
|
||||
SCTP_STAT_DECR_GAUGE32(sctps_currestab);
|
||||
}
|
||||
@ -7285,8 +7305,10 @@ re_look:
|
||||
SCTP_TCB_SEND_LOCK(stcb);
|
||||
send_lock_up = 1;
|
||||
if (sp->msg_is_complete) {
|
||||
/* the sender finished the
|
||||
* msg */
|
||||
/*
|
||||
* the sender finished the
|
||||
* msg
|
||||
*/
|
||||
goto re_look;
|
||||
}
|
||||
}
|
||||
@ -8175,8 +8197,10 @@ again_one_more_time:
|
||||
net->port, NULL,
|
||||
0, 0,
|
||||
so_locked))) {
|
||||
/* error, we could not
|
||||
* output */
|
||||
/*
|
||||
* error, we could not
|
||||
* output
|
||||
*/
|
||||
SCTPDBG(SCTP_DEBUG_OUTPUT3, "Gak send error %d\n", error);
|
||||
if (from_where == 0) {
|
||||
SCTP_STAT_INCR(sctps_lowlevelerrusr);
|
||||
@ -8249,12 +8273,16 @@ again_one_more_time:
|
||||
* to where the sack is going..
|
||||
*/
|
||||
if (chk->whoTo == net) {
|
||||
/* Don't transmit it to where its
|
||||
* going (current net) */
|
||||
/*
|
||||
* Don't transmit it to where its
|
||||
* going (current net)
|
||||
*/
|
||||
continue;
|
||||
} else if (sack_goes_to == net) {
|
||||
/* But do transmit it to this
|
||||
* address */
|
||||
/*
|
||||
* But do transmit it to this
|
||||
* address
|
||||
*/
|
||||
goto skip_net_check;
|
||||
}
|
||||
}
|
||||
@ -8447,8 +8475,10 @@ again_one_more_time:
|
||||
net->port, NULL,
|
||||
0, 0,
|
||||
so_locked))) {
|
||||
/* error, we could not
|
||||
* output */
|
||||
/*
|
||||
* error, we could not
|
||||
* output
|
||||
*/
|
||||
SCTPDBG(SCTP_DEBUG_OUTPUT3, "Gak send error %d\n", error);
|
||||
if (from_where == 0) {
|
||||
SCTP_STAT_INCR(sctps_lowlevelerrusr);
|
||||
@ -8645,13 +8675,17 @@ again_one_more_time:
|
||||
override_ok = 0;
|
||||
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
|
||||
} else if (override_ok) {
|
||||
/* use this data's
|
||||
* keyid */
|
||||
/*
|
||||
* use this data's
|
||||
* keyid
|
||||
*/
|
||||
auth_keyid = chk->auth_keyid;
|
||||
override_ok = 0;
|
||||
} else if (auth_keyid != chk->auth_keyid) {
|
||||
/* different keyid,
|
||||
* so done bundling */
|
||||
/*
|
||||
* different keyid,
|
||||
* so done bundling
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -8730,7 +8764,8 @@ again_one_more_time:
|
||||
break;
|
||||
}
|
||||
} /* for (chunk gather loop for this net) */
|
||||
} /* if asoc.state OPEN */ no_data_fill:
|
||||
} /* if asoc.state OPEN */
|
||||
no_data_fill:
|
||||
/* Is there something to send for this destination? */
|
||||
if (outchain) {
|
||||
/* We may need to start a control timer or two */
|
||||
@ -9691,8 +9726,10 @@ one_chunk_around:
|
||||
auth_keyid = fwd->auth_keyid;
|
||||
override_ok = 0;
|
||||
} else if (fwd->auth_keyid != auth_keyid) {
|
||||
/* different keyid,
|
||||
* so done bundling */
|
||||
/*
|
||||
* different keyid,
|
||||
* so done bundling
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -10068,9 +10105,11 @@ do_it_again:
|
||||
if (asoc->max_burst > 0) {
|
||||
if (SCTP_BASE_SYSCTL(sctp_use_cwnd_based_maxburst)) {
|
||||
if ((net->flight_size + (asoc->max_burst * net->mtu)) < net->cwnd) {
|
||||
/* JRS - Use the congestion
|
||||
/*
|
||||
* JRS - Use the congestion
|
||||
* control given in the
|
||||
* congestion control module */
|
||||
* congestion control module
|
||||
*/
|
||||
asoc->cc_functions.sctp_cwnd_update_after_output(stcb, net, asoc->max_burst);
|
||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_MAXBURST_ENABLE) {
|
||||
sctp_log_maxburst(stcb, net, 0, asoc->max_burst, SCTP_MAX_BURST_APPLIED);
|
||||
@ -10080,8 +10119,10 @@ do_it_again:
|
||||
net->fast_retran_ip = 0;
|
||||
} else {
|
||||
if (net->flight_size == 0) {
|
||||
/* Should be decaying the
|
||||
* cwnd here */
|
||||
/*
|
||||
* Should be decaying the
|
||||
* cwnd here
|
||||
*/
|
||||
;
|
||||
}
|
||||
}
|
||||
@ -11563,8 +11604,10 @@ sctp_send_cwr(struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t high_tsn, u
|
||||
asoc = &stcb->asoc;
|
||||
TAILQ_FOREACH(chk, &asoc->control_send_queue, sctp_next) {
|
||||
if ((chk->rec.chunk_id.id == SCTP_ECN_CWR) && (net == chk->whoTo)) {
|
||||
/* found a previous CWR queued to same destination
|
||||
* update it if needed */
|
||||
/*
|
||||
* found a previous CWR queued to same destination
|
||||
* update it if needed
|
||||
*/
|
||||
uint32_t ctsn;
|
||||
|
||||
cwr = mtod(chk->data, struct sctp_cwr_chunk *);
|
||||
@ -12141,8 +12184,10 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb,
|
||||
stcb->asoc.strmout[i].sid = i;
|
||||
stcb->asoc.strmout[i].state = oldstream[i].state;
|
||||
/* FIX ME FIX ME */
|
||||
/* This should be a SS_COPY operation FIX ME STREAM
|
||||
* SCHEDULER EXPERT */
|
||||
/*
|
||||
* This should be a SS_COPY operation FIX ME STREAM
|
||||
* SCHEDULER EXPERT
|
||||
*/
|
||||
stcb->asoc.ss_functions.sctp_ss_init_stream(stcb, &stcb->asoc.strmout[i], &oldstream[i]);
|
||||
/* now anything on those queues? */
|
||||
TAILQ_FOREACH_SAFE(sp, &oldstream[i].outqueue, next, nsp) {
|
||||
@ -12672,8 +12717,10 @@ sctp_lower_sosend(struct socket *so,
|
||||
}
|
||||
if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) {
|
||||
stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED;
|
||||
/* Set the connected flag so we can queue
|
||||
* data */
|
||||
/*
|
||||
* Set the connected flag so we can queue
|
||||
* data
|
||||
*/
|
||||
soisconnecting(so);
|
||||
}
|
||||
hold_tcblock = 1;
|
||||
@ -12683,8 +12730,10 @@ sctp_lower_sosend(struct socket *so,
|
||||
} else {
|
||||
SCTP_PRINTF("Huh-3? create lock should have been on??\n");
|
||||
}
|
||||
/* Turn on queue only flag to prevent data from
|
||||
* being sent */
|
||||
/*
|
||||
* Turn on queue only flag to prevent data from
|
||||
* being sent
|
||||
*/
|
||||
queue_only = 1;
|
||||
asoc = &stcb->asoc;
|
||||
SCTP_SET_STATE(asoc, SCTP_STATE_COOKIE_WAIT);
|
||||
@ -13177,8 +13226,10 @@ skip_preblock:
|
||||
}
|
||||
/* PR-SCTP? */
|
||||
if ((asoc->prsctp_supported) && (asoc->sent_queue_cnt_removeable > 0)) {
|
||||
/* This is ugly but we must assure locking
|
||||
* order */
|
||||
/*
|
||||
* This is ugly but we must assure locking
|
||||
* order
|
||||
*/
|
||||
if (hold_tcblock == 0) {
|
||||
SCTP_TCB_LOCK(stcb);
|
||||
hold_tcblock = 1;
|
||||
@ -13455,8 +13506,10 @@ dataless_eof:
|
||||
msg);
|
||||
sctp_abort_an_association(stcb->sctp_ep, stcb,
|
||||
op_err, SCTP_SO_LOCKED);
|
||||
/* now relock the stcb so everything
|
||||
* is sane */
|
||||
/*
|
||||
* now relock the stcb so everything
|
||||
* is sane
|
||||
*/
|
||||
hold_tcblock = 0;
|
||||
stcb = NULL;
|
||||
goto out;
|
||||
@ -13530,8 +13583,10 @@ skip_out_eof:
|
||||
if ((queue_only == 0) && (nagle_applies == 0) && (stcb->asoc.peers_rwnd && un_sent)) {
|
||||
/* we can attempt to send too. */
|
||||
if (hold_tcblock == 0) {
|
||||
/* If there is activity recv'ing sacks no need to
|
||||
* send */
|
||||
/*
|
||||
* If there is activity recv'ing sacks no need to
|
||||
* send
|
||||
*/
|
||||
if (SCTP_TCB_TRYLOCK(stcb)) {
|
||||
sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_USR_SEND, SCTP_SO_LOCKED);
|
||||
hold_tcblock = 1;
|
||||
|
@ -1212,8 +1212,10 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from,
|
||||
if (netp != NULL) {
|
||||
*netp = net;
|
||||
}
|
||||
/* Update the endpoint
|
||||
* pointer */
|
||||
/*
|
||||
* Update the endpoint
|
||||
* pointer
|
||||
*/
|
||||
*inp_p = inp;
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
return (stcb);
|
||||
@ -1234,8 +1236,10 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from,
|
||||
if (netp != NULL) {
|
||||
*netp = net;
|
||||
}
|
||||
/* Update the endpoint
|
||||
* pointer */
|
||||
/*
|
||||
* Update the endpoint
|
||||
* pointer
|
||||
*/
|
||||
*inp_p = inp;
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
return (stcb);
|
||||
@ -1662,8 +1666,10 @@ sctp_endpoint_probe(struct sockaddr *nam, struct sctppcbhead *head,
|
||||
case AF_INET:
|
||||
if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
|
||||
SCTP_IPV6_V6ONLY(inp)) {
|
||||
/* IPv4 on a IPv6 socket with ONLY
|
||||
* IPv6 set */
|
||||
/*
|
||||
* IPv4 on a IPv6 socket with ONLY
|
||||
* IPv6 set
|
||||
*/
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
continue;
|
||||
}
|
||||
@ -1676,8 +1682,10 @@ sctp_endpoint_probe(struct sockaddr *nam, struct sctppcbhead *head,
|
||||
#endif
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
/* A V6 address and the endpoint is NOT
|
||||
* bound V6 */
|
||||
/*
|
||||
* A V6 address and the endpoint is NOT
|
||||
* bound V6
|
||||
*/
|
||||
if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) {
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
continue;
|
||||
@ -2175,8 +2183,10 @@ sctp_findassoc_by_vtag(struct sockaddr *from, struct sockaddr *to, uint32_t vtag
|
||||
continue;
|
||||
}
|
||||
if (remote_tag) {
|
||||
/* If we have both vtags that's all we match
|
||||
* on */
|
||||
/*
|
||||
* If we have both vtags that's all we match
|
||||
* on
|
||||
*/
|
||||
if (stcb->asoc.peer_vtag == remote_tag) {
|
||||
/*
|
||||
* If both tags match we consider it
|
||||
@ -2869,8 +2879,10 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr,
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
{
|
||||
/* Only for pure IPv6 Address. (No IPv4
|
||||
* Mapped!) */
|
||||
/*
|
||||
* Only for pure IPv6 Address. (No IPv4
|
||||
* Mapped!)
|
||||
*/
|
||||
struct sockaddr_in6 *sin6;
|
||||
|
||||
sin6 = (struct sockaddr_in6 *)addr;
|
||||
@ -2947,8 +2959,10 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr,
|
||||
/* unlock info */
|
||||
if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PORTREUSE)) &&
|
||||
(sctp_is_feature_on(inp_tmp, SCTP_PCB_FLAGS_PORTREUSE))) {
|
||||
/* Ok, must be one-2-one and
|
||||
* allowing port re-use */
|
||||
/*
|
||||
* Ok, must be one-2-one and
|
||||
* allowing port re-use
|
||||
*/
|
||||
port_reuse_active = 1;
|
||||
goto continue_anyway;
|
||||
}
|
||||
@ -2971,8 +2985,10 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr,
|
||||
/* unlock info */
|
||||
if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PORTREUSE)) &&
|
||||
(sctp_is_feature_on(inp_tmp, SCTP_PCB_FLAGS_PORTREUSE))) {
|
||||
/* Ok, must be one-2-one and
|
||||
* allowing port re-use */
|
||||
/*
|
||||
* Ok, must be one-2-one and
|
||||
* allowing port re-use
|
||||
*/
|
||||
port_reuse_active = 1;
|
||||
goto continue_anyway;
|
||||
}
|
||||
@ -3271,8 +3287,10 @@ sctp_iterator_inp_being_freed(struct sctp_inpcb *inp)
|
||||
SCTP_INP_INCR_REF(it->inp);
|
||||
}
|
||||
}
|
||||
/* When its put in the refcnt is incremented so decr
|
||||
* it */
|
||||
/*
|
||||
* When its put in the refcnt is incremented so decr
|
||||
* it
|
||||
*/
|
||||
SCTP_INP_DECR_REF(inp);
|
||||
}
|
||||
}
|
||||
@ -3955,8 +3973,10 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr,
|
||||
|
||||
rmtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, net->ro.ro_rt);
|
||||
if (rmtu == 0) {
|
||||
/* Start things off to match mtu of
|
||||
* interface please. */
|
||||
/*
|
||||
* Start things off to match mtu of
|
||||
* interface please.
|
||||
*/
|
||||
SCTP_SET_MTU_OF_ROUTE(&net->ro._l_addr.sa,
|
||||
net->ro.ro_rt, net->mtu);
|
||||
} else {
|
||||
@ -5447,8 +5467,10 @@ sctp_del_local_addr_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa)
|
||||
if (stcb->asoc.last_used_address == laddr)
|
||||
/* delete this address */
|
||||
stcb->asoc.last_used_address = NULL;
|
||||
/* Now spin through all the nets and purge any ref
|
||||
* to laddr */
|
||||
/*
|
||||
* Now spin through all the nets and purge any ref
|
||||
* to laddr
|
||||
*/
|
||||
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
|
||||
if (net->ro._s_addr == laddr->ifa) {
|
||||
/* Yep, purge src address selected */
|
||||
@ -6224,8 +6246,10 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
|
||||
struct mbuf *op_err;
|
||||
char msg[SCTP_DIAG_INFO_LEN];
|
||||
|
||||
/* in setup state we
|
||||
* abort this guy */
|
||||
/*
|
||||
* in setup state we
|
||||
* abort this guy
|
||||
*/
|
||||
snprintf(msg, sizeof(msg),
|
||||
"%s:%d at %s", __FILE__, __LINE__, __func__);
|
||||
op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code),
|
||||
@ -6267,8 +6291,10 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
|
||||
goto next_param;
|
||||
}
|
||||
if (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr)) {
|
||||
/* Link local make no sense without
|
||||
* scope */
|
||||
/*
|
||||
* Link local make no sense without
|
||||
* scope
|
||||
*/
|
||||
goto next_param;
|
||||
}
|
||||
sa = (struct sockaddr *)&sin6;
|
||||
@ -6319,8 +6345,10 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
|
||||
struct mbuf *op_err;
|
||||
char msg[SCTP_DIAG_INFO_LEN];
|
||||
|
||||
/* in setup state we
|
||||
* abort this guy */
|
||||
/*
|
||||
* in setup state we
|
||||
* abort this guy
|
||||
*/
|
||||
snprintf(msg, sizeof(msg),
|
||||
"%s:%d at %s", __FILE__, __LINE__, __func__);
|
||||
op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code),
|
||||
|
@ -379,8 +379,10 @@ struct sctp_inpcb {
|
||||
|
||||
/* list of addrs in use by the EP, NULL if bound-all */
|
||||
struct sctpladdr sctp_addr_list;
|
||||
/* used for source address selection rotation when we are subset
|
||||
* bound */
|
||||
/*
|
||||
* used for source address selection rotation when we are subset
|
||||
* bound
|
||||
*/
|
||||
struct sctp_laddr *next_addr_touse;
|
||||
|
||||
/* back pointer to our socket */
|
||||
|
@ -144,8 +144,10 @@ sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
if (holds_lock == 0) {
|
||||
SCTP_TCB_SEND_LOCK(stcb);
|
||||
}
|
||||
/* Remove from wheel if stream queue is empty and actually is on the
|
||||
* wheel */
|
||||
/*
|
||||
* Remove from wheel if stream queue is empty and actually is on the
|
||||
* wheel
|
||||
*/
|
||||
if (TAILQ_EMPTY(&strq->outqueue) &&
|
||||
(strq->ss_params.rr.next_spoke.tqe_next != NULL ||
|
||||
strq->ss_params.rr.next_spoke.tqe_prev != NULL)) {
|
||||
@ -457,8 +459,10 @@ sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
if (holds_lock == 0) {
|
||||
SCTP_TCB_SEND_LOCK(stcb);
|
||||
}
|
||||
/* Remove from wheel if stream queue is empty and actually is on the
|
||||
* wheel */
|
||||
/*
|
||||
* Remove from wheel if stream queue is empty and actually is on the
|
||||
* wheel
|
||||
*/
|
||||
if (TAILQ_EMPTY(&strq->outqueue) &&
|
||||
(strq->ss_params.prio.next_spoke.tqe_next != NULL ||
|
||||
strq->ss_params.prio.next_spoke.tqe_prev != NULL)) {
|
||||
@ -631,8 +635,10 @@ sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
|
||||
if (holds_lock == 0) {
|
||||
SCTP_TCB_SEND_LOCK(stcb);
|
||||
}
|
||||
/* Remove from wheel if stream queue is empty and actually is on the
|
||||
* wheel */
|
||||
/*
|
||||
* Remove from wheel if stream queue is empty and actually is on the
|
||||
* wheel
|
||||
*/
|
||||
if (TAILQ_EMPTY(&strq->outqueue) &&
|
||||
(strq->ss_params.fb.next_spoke.tqe_next != NULL ||
|
||||
strq->ss_params.fb.next_spoke.tqe_prev != NULL)) {
|
||||
|
@ -881,8 +881,10 @@ struct sctp_association {
|
||||
|
||||
/* JRS - the congestion control functions are in this struct */
|
||||
struct sctp_cc_functions cc_functions;
|
||||
/* JRS - value to store the currently loaded congestion control
|
||||
* module */
|
||||
/*
|
||||
* JRS - value to store the currently loaded congestion control
|
||||
* module
|
||||
*/
|
||||
uint32_t congestion_control_module;
|
||||
/* RS - the stream scheduling functions are in this struct */
|
||||
struct sctp_ss_functions ss_functions;
|
||||
|
@ -193,8 +193,10 @@ sctp_find_alternate_net(struct sctp_tcb *stcb,
|
||||
*/
|
||||
if (mode == 2) {
|
||||
TAILQ_FOREACH(mnet, &stcb->asoc.nets, sctp_next) {
|
||||
/* JRS 5/14/07 - If the destination is unreachable
|
||||
* or unconfirmed, skip it. */
|
||||
/*
|
||||
* JRS 5/14/07 - If the destination is unreachable
|
||||
* or unconfirmed, skip it.
|
||||
*/
|
||||
if (((mnet->dest_state & SCTP_ADDR_REACHABLE) != SCTP_ADDR_REACHABLE) ||
|
||||
(mnet->dest_state & SCTP_ADDR_UNCONFIRMED)) {
|
||||
continue;
|
||||
|
@ -975,8 +975,10 @@ sctp_shutdown(struct socket *so)
|
||||
}
|
||||
}
|
||||
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, netp);
|
||||
/* XXX: Why do this in the case where we have still data
|
||||
* queued? */
|
||||
/*
|
||||
* XXX: Why do this in the case where we have still data
|
||||
* queued?
|
||||
*/
|
||||
sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED);
|
||||
SCTP_TCB_UNLOCK(stcb);
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
@ -1811,8 +1813,10 @@ flags_out:
|
||||
}
|
||||
SCTP_TCB_UNLOCK(stcb);
|
||||
} else {
|
||||
/* Can't get stream value without
|
||||
* association */
|
||||
/*
|
||||
* Can't get stream value without
|
||||
* association
|
||||
*/
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
}
|
||||
@ -3887,10 +3891,12 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
(sctp_is_feature_on(inp, SCTP_PCB_FLAGS_INTERLEAVE_STRMS))) {
|
||||
inp->idata_supported = 1;
|
||||
} else {
|
||||
/* Must have Frag
|
||||
/*
|
||||
* Must have Frag
|
||||
* interleave and
|
||||
* stream interleave
|
||||
* on */
|
||||
* on
|
||||
*/
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
}
|
||||
@ -4101,8 +4107,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
}
|
||||
SCTP_INP_RUNLOCK(inp);
|
||||
} else {
|
||||
/* Can't set stream value without
|
||||
* association */
|
||||
/*
|
||||
* Can't set stream value without
|
||||
* association
|
||||
*/
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
}
|
||||
@ -4332,8 +4340,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) {
|
||||
SCTP_TCB_LOCK(stcb);
|
||||
shared_keys = &stcb->asoc.shared_keys;
|
||||
/* clear the cached keys for
|
||||
* this key id */
|
||||
/*
|
||||
* clear the cached keys for
|
||||
* this key id
|
||||
*/
|
||||
sctp_clear_cachedkeys(stcb, sca->sca_keynumber);
|
||||
/*
|
||||
* create the new shared key
|
||||
@ -4732,8 +4742,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
int cnt;
|
||||
|
||||
addstream |= 2;
|
||||
/* We allocate inside
|
||||
* sctp_send_str_reset_req() */
|
||||
/*
|
||||
* We allocate inside
|
||||
* sctp_send_str_reset_req()
|
||||
*/
|
||||
add_i_strmcnt = stradd->sas_instrms;
|
||||
cnt = add_i_strmcnt;
|
||||
cnt += stcb->asoc.streamincnt;
|
||||
@ -4781,8 +4793,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
SCTP_TCB_UNLOCK(stcb);
|
||||
break;
|
||||
}
|
||||
/* Is there any data pending in the send or sent
|
||||
* queues? */
|
||||
/*
|
||||
* Is there any data pending in the send or sent
|
||||
* queues?
|
||||
*/
|
||||
if (!TAILQ_EMPTY(&stcb->asoc.send_queue) ||
|
||||
!TAILQ_EMPTY(&stcb->asoc.sent_queue)) {
|
||||
busy_out:
|
||||
@ -4928,8 +4942,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
(inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) ||
|
||||
(av->assoc_id == SCTP_FUTURE_ASSOC)) {
|
||||
SCTP_INP_WLOCK(inp);
|
||||
/* FIXME MT: I think this is not in
|
||||
* tune with the API ID */
|
||||
/*
|
||||
* FIXME MT: I think this is not in
|
||||
* tune with the API ID
|
||||
*/
|
||||
if (av->assoc_value) {
|
||||
inp->sctp_frag_point = (av->assoc_value + ovh);
|
||||
} else {
|
||||
@ -5072,8 +5088,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
}
|
||||
SCTP_TCB_UNLOCK(stcb);
|
||||
}
|
||||
/* Send up the sender dry event only for 1-to-1
|
||||
* style sockets. */
|
||||
/*
|
||||
* Send up the sender dry event only for 1-to-1
|
||||
* style sockets.
|
||||
*/
|
||||
if (events->sctp_sender_dry_event) {
|
||||
if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
|
||||
(inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
|
||||
@ -5784,8 +5802,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
goto out_of_it;
|
||||
}
|
||||
if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) == 0) {
|
||||
/* Must validate the ifa found is in
|
||||
* our ep */
|
||||
/*
|
||||
* Must validate the ifa found is in
|
||||
* our ep
|
||||
*/
|
||||
struct sctp_laddr *laddr;
|
||||
int found = 0;
|
||||
|
||||
@ -6541,8 +6561,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
(av->assoc_id == SCTP_FUTURE_ASSOC)) {
|
||||
if ((av->assoc_value == 0) &&
|
||||
(inp->asconf_supported == 1)) {
|
||||
/* AUTH is required for
|
||||
* ASCONF */
|
||||
/*
|
||||
* AUTH is required for
|
||||
* ASCONF
|
||||
*/
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
} else {
|
||||
@ -6578,8 +6600,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
(av->assoc_id == SCTP_FUTURE_ASSOC)) {
|
||||
if ((av->assoc_value != 0) &&
|
||||
(inp->auth_supported == 0)) {
|
||||
/* AUTH is required for
|
||||
* ASCONF */
|
||||
/*
|
||||
* AUTH is required for
|
||||
* ASCONF
|
||||
*/
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
} else {
|
||||
@ -7011,8 +7035,10 @@ sctp_listen(struct socket *so, int backlog, struct thread *p)
|
||||
((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) == 0) &&
|
||||
((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) &&
|
||||
(tinp->sctp_socket->so_qlimit)) {
|
||||
/* we have a listener already and
|
||||
* its not this inp. */
|
||||
/*
|
||||
* we have a listener already and
|
||||
* its not this inp.
|
||||
*/
|
||||
SCTP_INP_DECR_REF(tinp);
|
||||
return (EADDRINUSE);
|
||||
} else if (tinp) {
|
||||
@ -7053,8 +7079,10 @@ sctp_listen(struct socket *so, int backlog, struct thread *p)
|
||||
((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) == 0) &&
|
||||
((tinp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) &&
|
||||
(tinp->sctp_socket->so_qlimit)) {
|
||||
/* we have a listener already and its not
|
||||
* this inp. */
|
||||
/*
|
||||
* we have a listener already and its not
|
||||
* this inp.
|
||||
*/
|
||||
SCTP_INP_DECR_REF(tinp);
|
||||
return (EADDRINUSE);
|
||||
} else if (tinp) {
|
||||
|
@ -1482,8 +1482,10 @@ sctp_handle_addr_wq(void)
|
||||
sctp_asconf_iterator_end, NULL, 0);
|
||||
if (ret) {
|
||||
SCTP_PRINTF("Failed to initiate iterator for handle_addr_wq\n");
|
||||
/* Freeing if we are stopping or put back on the
|
||||
* addr_wq. */
|
||||
/*
|
||||
* Freeing if we are stopping or put back on the
|
||||
* addr_wq.
|
||||
*/
|
||||
if (SCTP_BASE_VAR(sctp_pcb_initialized) == 0) {
|
||||
sctp_asconf_iterator_end(asc, 0);
|
||||
} else {
|
||||
@ -2483,8 +2485,10 @@ sctp_calculate_rto(struct sctp_tcb *stcb,
|
||||
/* compute rtt in ms */
|
||||
rtt = (int32_t)(net->rtt / 1000);
|
||||
if ((asoc->cc_functions.sctp_rtt_calculated) && (rtt_from_sack == SCTP_RTT_FROM_DATA)) {
|
||||
/* Tell the CC module that a new update has just occurred
|
||||
* from a sack */
|
||||
/*
|
||||
* Tell the CC module that a new update has just occurred
|
||||
* from a sack
|
||||
*/
|
||||
(*asoc->cc_functions.sctp_rtt_calculated) (stcb, net, &now);
|
||||
}
|
||||
/*
|
||||
@ -4792,8 +4796,10 @@ sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1,
|
||||
do_wakeup_routine = 1;
|
||||
tp1->sent = SCTP_FORWARD_TSN_SKIP;
|
||||
TAILQ_REMOVE(&stcb->asoc.send_queue, tp1, sctp_next);
|
||||
/* on to the sent queue so we can wait for it to be
|
||||
* passed by. */
|
||||
/*
|
||||
* on to the sent queue so we can wait for it to be
|
||||
* passed by.
|
||||
*/
|
||||
TAILQ_INSERT_TAIL(&stcb->asoc.sent_queue, tp1,
|
||||
sctp_next);
|
||||
stcb->asoc.send_queue_cnt--;
|
||||
@ -5286,8 +5292,10 @@ restart_nosblocks:
|
||||
* connect.
|
||||
*/
|
||||
if (inp->sctp_flags & SCTP_PCB_FLAGS_WAS_ABORTED) {
|
||||
/* You were aborted, passive side
|
||||
* always hits here */
|
||||
/*
|
||||
* You were aborted, passive side
|
||||
* always hits here
|
||||
*/
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTPUTIL, ECONNRESET);
|
||||
error = ECONNRESET;
|
||||
}
|
||||
@ -5386,8 +5394,10 @@ restart_nosblocks:
|
||||
}
|
||||
if ((control->length == 0) &&
|
||||
(control->end_added == 1)) {
|
||||
/* Do we also need to check for (control->pdapi_aborted ==
|
||||
* 1)? */
|
||||
/*
|
||||
* Do we also need to check for (control->pdapi_aborted ==
|
||||
* 1)?
|
||||
*/
|
||||
if (hold_rlock == 0) {
|
||||
hold_rlock = 1;
|
||||
SCTP_INP_READ_LOCK(inp);
|
||||
@ -5730,8 +5740,10 @@ get_more_data:
|
||||
atomic_subtract_int(&control->length, cp_len);
|
||||
control->data = sctp_m_free(m);
|
||||
m = control->data;
|
||||
/* been through it all, must hold sb
|
||||
* lock ok to null tail */
|
||||
/*
|
||||
* been through it all, must hold sb
|
||||
* lock ok to null tail
|
||||
*/
|
||||
if (control->data == NULL) {
|
||||
#ifdef INVARIANTS
|
||||
if ((control->end_added == 0) ||
|
||||
@ -5950,8 +5962,10 @@ wait_some_more:
|
||||
*/
|
||||
SCTP_INP_READ_LOCK(inp);
|
||||
if ((control->length > 0) && (control->data == NULL)) {
|
||||
/* big trouble.. we have the lock and its
|
||||
* corrupt? */
|
||||
/*
|
||||
* big trouble.. we have the lock and its
|
||||
* corrupt?
|
||||
*/
|
||||
#ifdef INVARIANTS
|
||||
panic("Impossible data==NULL length !=0");
|
||||
#endif
|
||||
@ -6666,8 +6680,10 @@ sctp_local_addr_count(struct sctp_tcb *stcb)
|
||||
|
||||
sin = &sctp_ifa->address.sin;
|
||||
if (sin->sin_addr.s_addr == 0) {
|
||||
/* skip unspecified
|
||||
* addrs */
|
||||
/*
|
||||
* skip unspecified
|
||||
* addrs
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
if (prison_check_ip4(stcb->sctp_ep->ip_inp.inp.inp_cred,
|
||||
|
Loading…
x
Reference in New Issue
Block a user