mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Whitespace changes.
This commit is contained in:
parent
203c00b359
commit
8d86bd564f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335176
@ -2545,6 +2545,7 @@ sctp_choose_boundspecific_inp(struct sctp_inpcb *inp,
|
||||
inp->next_addr_touse = NULL;
|
||||
goto once_again;
|
||||
}
|
||||
|
||||
inp->next_addr_touse = starting_point;
|
||||
resettotop = 0;
|
||||
once_again_too:
|
||||
@ -2552,6 +2553,7 @@ sctp_choose_boundspecific_inp(struct sctp_inpcb *inp,
|
||||
inp->next_addr_touse = LIST_FIRST(&inp->sctp_addr_list);
|
||||
resettotop = 1;
|
||||
}
|
||||
|
||||
/* ok, what about an acceptable address in the inp */
|
||||
for (laddr = inp->next_addr_touse; laddr;
|
||||
laddr = LIST_NEXT(laddr, sctp_nxt_addr)) {
|
||||
@ -2574,6 +2576,7 @@ sctp_choose_boundspecific_inp(struct sctp_inpcb *inp,
|
||||
inp->next_addr_touse = NULL;
|
||||
goto once_again_too;
|
||||
}
|
||||
|
||||
/*
|
||||
* no address bound can be a source for the destination we are in
|
||||
* trouble
|
||||
@ -3988,8 +3991,8 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
||||
int so_locked
|
||||
#endif
|
||||
)
|
||||
/* nofragment_flag to tell if IP_DF should be set (IPv4 only) */
|
||||
{
|
||||
/* nofragment_flag to tell if IP_DF should be set (IPv4 only) */
|
||||
/**
|
||||
* Given a mbuf chain (via SCTP_BUF_NEXT()) that holds a packet header
|
||||
* WITH an SCTPHDR but no IP header, endpoint inp and sa structure:
|
||||
@ -4036,6 +4039,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
||||
if ((auth != NULL) && (stcb != NULL)) {
|
||||
sctp_fill_hmac_digest_m(m, auth_offset, auth, stcb, auth_keyid);
|
||||
}
|
||||
|
||||
if (net) {
|
||||
tos_value = net->dscp;
|
||||
} else if (stcb) {
|
||||
@ -4550,6 +4554,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
|
||||
prev_scope = sin6->sin6_scope_id;
|
||||
prev_port = sin6->sin6_port;
|
||||
}
|
||||
|
||||
if (SCTP_GET_HEADER_FOR_OUTPUT(o_pak)) {
|
||||
/* failed to prepend data, give up */
|
||||
sctp_m_freem(m);
|
||||
@ -4738,6 +4743,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
|
||||
ali->indication = htonl(inp->sctp_ep.adaptation_layer_indicator);
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* ECN parameter */
|
||||
if (stcb->asoc.ecn_supported == 1) {
|
||||
parameter_len = (uint16_t)sizeof(struct sctp_paramhdr);
|
||||
@ -4746,6 +4752,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
|
||||
ph->param_length = htons(parameter_len);
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* PR-SCTP supported parameter */
|
||||
if (stcb->asoc.prsctp_supported == 1) {
|
||||
parameter_len = (uint16_t)sizeof(struct sctp_paramhdr);
|
||||
@ -4754,6 +4761,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
|
||||
ph->param_length = htons(parameter_len);
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* Add NAT friendly parameter. */
|
||||
if (SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly)) {
|
||||
parameter_len = (uint16_t)sizeof(struct sctp_paramhdr);
|
||||
@ -4762,6 +4770,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
|
||||
ph->param_length = htons(parameter_len);
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* And now tell the peer which extensions we support */
|
||||
num_ext = 0;
|
||||
pr_supported = (struct sctp_supported_chunk_types_param *)(mtod(m, caddr_t)+chunk_len);
|
||||
@ -4852,6 +4861,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
}
|
||||
|
||||
/* now any cookie time extensions */
|
||||
if (stcb->asoc.cookie_preserve_req) {
|
||||
struct sctp_cookie_perserve_param *cookie_preserve;
|
||||
@ -4869,6 +4879,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
|
||||
stcb->asoc.cookie_preserve_req = 0;
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
if (stcb->asoc.scope.ipv4_addr_legal || stcb->asoc.scope.ipv6_addr_legal) {
|
||||
uint8_t i;
|
||||
|
||||
@ -4897,6 +4908,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked
|
||||
padding_len = 4 - 2 * i;
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
SCTP_BUF_LEN(m) = chunk_len;
|
||||
/* now the addresses */
|
||||
/*
|
||||
@ -5902,6 +5914,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
ali->indication = htonl(inp->sctp_ep.adaptation_layer_indicator);
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* ECN parameter */
|
||||
if (((asoc != NULL) && (asoc->ecn_supported == 1)) ||
|
||||
((asoc == NULL) && (inp->ecn_supported == 1))) {
|
||||
@ -5911,6 +5924,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
ph->param_length = htons(parameter_len);
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* PR-SCTP supported parameter */
|
||||
if (((asoc != NULL) && (asoc->prsctp_supported == 1)) ||
|
||||
((asoc == NULL) && (inp->prsctp_supported == 1))) {
|
||||
@ -5920,6 +5934,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
ph->param_length = htons(parameter_len);
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* Add NAT friendly parameter */
|
||||
if (nat_friendly) {
|
||||
parameter_len = (uint16_t)sizeof(struct sctp_paramhdr);
|
||||
@ -5928,6 +5943,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
ph->param_length = htons(parameter_len);
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* And now tell the peer which extensions we support */
|
||||
num_ext = 0;
|
||||
pr_supported = (struct sctp_supported_chunk_types_param *)(mtod(m, caddr_t)+chunk_len);
|
||||
@ -5971,6 +5987,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
padding_len = SCTP_SIZE32(parameter_len) - parameter_len;
|
||||
chunk_len += parameter_len;
|
||||
}
|
||||
|
||||
/* add authentication parameters */
|
||||
if (((asoc != NULL) && (asoc->auth_supported == 1)) ||
|
||||
((asoc == NULL) && (inp->auth_supported == 1))) {
|
||||
@ -6048,6 +6065,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
SCTP_BUF_LEN(m) += padding_len;
|
||||
padding_len = 0;
|
||||
}
|
||||
|
||||
/* tack on the operational error if present */
|
||||
if (op_err) {
|
||||
parameter_len = 0;
|
||||
@ -7431,6 +7449,7 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb,
|
||||
chk->last_mbuf = SCTP_BUF_NEXT(chk->last_mbuf);
|
||||
}
|
||||
}
|
||||
|
||||
if (to_move > length) {
|
||||
/*- This should not happen either
|
||||
* since we always lower to_move to the size
|
||||
@ -7968,6 +7987,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
*reason_code = 8;
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (asoc->sctp_cmt_on_off > 0) {
|
||||
/* get the last start point */
|
||||
start_at = asoc->last_net_cmt_send_started;
|
||||
@ -8614,6 +8634,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
/* Don't send the chunk on this net */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (asoc->sctp_cmt_on_off == 0) {
|
||||
if ((asoc->alternate) &&
|
||||
(asoc->alternate != net) &&
|
||||
@ -8877,6 +8898,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp,
|
||||
if (old_start_at)
|
||||
goto again_one_more_time;
|
||||
}
|
||||
|
||||
/*
|
||||
* At the end there should be no NON timed chunks hanging on this
|
||||
* queue.
|
||||
@ -9270,17 +9292,20 @@ sctp_send_asconf(struct sctp_tcb *stcb, struct sctp_nets *net, int addr_locked)
|
||||
/* can't send a new one if there is one in flight already */
|
||||
return;
|
||||
}
|
||||
|
||||
/* compose an ASCONF chunk, maximum length is PMTU */
|
||||
m_asconf = sctp_compose_asconf(stcb, &len, addr_locked);
|
||||
if (m_asconf == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
sctp_alloc_a_chunk(stcb, chk);
|
||||
if (chk == NULL) {
|
||||
/* no memory */
|
||||
sctp_m_freem(m_asconf);
|
||||
return;
|
||||
}
|
||||
|
||||
chk->copy_by_ref = 0;
|
||||
chk->rec.chunk_id.id = SCTP_ASCONF;
|
||||
chk->rec.chunk_id.can_take_data = 0;
|
||||
@ -9351,6 +9376,7 @@ sctp_send_asconf_ack(struct sctp_tcb *stcb)
|
||||
if (ack->data == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* copy the asconf_ack */
|
||||
m_ack = SCTP_M_COPYM(ack->data, 0, M_COPYALL, M_NOWAIT);
|
||||
if (m_ack == NULL) {
|
||||
@ -10239,6 +10265,7 @@ sctp_output(
|
||||
SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
if (inp->sctp_socket == NULL) {
|
||||
SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL);
|
||||
return (EINVAL);
|
||||
@ -11312,6 +11339,7 @@ sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked
|
||||
SCTPDBG(SCTP_DEBUG_OUTPUT4, "Gak, can't get a chunk for hb\n");
|
||||
return;
|
||||
}
|
||||
|
||||
chk->copy_by_ref = 0;
|
||||
chk->rec.chunk_id.id = SCTP_HEARTBEAT_REQUEST;
|
||||
chk->rec.chunk_id.can_take_data = 1;
|
||||
@ -12330,6 +12358,7 @@ sctp_copy_one(struct sctp_stream_queue_pending *sp,
|
||||
SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOBUFS);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
|
||||
sp->tail_mbuf = m_last(sp->data);
|
||||
return (0);
|
||||
}
|
||||
@ -12346,6 +12375,7 @@ sctp_copy_it_in(struct sctp_tcb *stcb,
|
||||
int user_marks_eor,
|
||||
int *error)
|
||||
{
|
||||
|
||||
/*-
|
||||
* This routine must be very careful in its work. Protocol
|
||||
* processing is up and running so care must be taken to spl...()
|
||||
@ -13010,6 +13040,7 @@ sctp_lower_sosend(struct socket *so,
|
||||
error = EFAULT;
|
||||
goto out_unlocked;
|
||||
}
|
||||
|
||||
/* Unless E_EOR mode is on, we must make a send FIT in one call. */
|
||||
if ((user_marks_eor == 0) &&
|
||||
(sndlen > SCTP_SB_LIMIT_SND(stcb->sctp_socket))) {
|
||||
@ -13027,6 +13058,7 @@ sctp_lower_sosend(struct socket *so,
|
||||
error = EINVAL;
|
||||
goto out_unlocked;
|
||||
}
|
||||
|
||||
if (user_marks_eor) {
|
||||
local_add_more = min(SCTP_SB_LIMIT_SND(so), SCTP_BASE_SYSCTL(sctp_add_more_threshold));
|
||||
} else {
|
||||
@ -13091,6 +13123,7 @@ sctp_lower_sosend(struct socket *so,
|
||||
}
|
||||
SOCKBUF_UNLOCK(&so->so_snd);
|
||||
}
|
||||
|
||||
skip_preblock:
|
||||
if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
|
||||
goto out_unlocked;
|
||||
@ -13227,6 +13260,7 @@ sctp_lower_sosend(struct socket *so,
|
||||
if (srcv->sinfo_flags & SCTP_SACK_IMMEDIATELY) {
|
||||
sp->sinfo_flags |= SCTP_SACK_IMMEDIATELY;
|
||||
}
|
||||
|
||||
/* Did we reach EOR? */
|
||||
if ((uio->uio_resid == 0) &&
|
||||
((user_marks_eor == 0) ||
|
||||
@ -13392,6 +13426,7 @@ sctp_lower_sosend(struct socket *so,
|
||||
SOCKBUF_UNLOCK(&so->so_snd);
|
||||
goto out_unlocked;
|
||||
}
|
||||
|
||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
|
||||
sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,
|
||||
asoc, stcb->asoc.total_output_queue_size);
|
||||
@ -13757,6 +13792,7 @@ sctp_v6src_match_nexthop(struct sockaddr_in6 *src6, sctp_route_t *ro)
|
||||
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)src6);
|
||||
return (0);
|
||||
}
|
||||
|
||||
SCTPDBG(SCTP_DEBUG_OUTPUT2, "v6src_match_nexthop(), Prefix entry is ");
|
||||
SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)src6);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user