summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_pcb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r--sys/netinet/sctp_pcb.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 1db8d33..ce71edc 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -1274,7 +1274,8 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock,
*/
struct sctp_tcb *
sctp_findassociation_addr_sa(struct sockaddr *to, struct sockaddr *from,
- struct sctp_inpcb **inp_p, struct sctp_nets **netp, int find_tcp_pool, uint32_t vrf_id)
+ struct sctp_inpcb **inp_p, struct sctp_nets **netp, int find_tcp_pool,
+ uint32_t vrf_id)
{
struct sctp_inpcb *inp = NULL;
struct sctp_tcb *retval;
@@ -1282,9 +1283,11 @@ sctp_findassociation_addr_sa(struct sockaddr *to, struct sockaddr *from,
SCTP_INP_INFO_RLOCK();
if (find_tcp_pool) {
if (inp_p != NULL) {
- retval = sctp_tcb_special_locate(inp_p, from, to, netp, vrf_id);
+ retval = sctp_tcb_special_locate(inp_p, from, to, netp,
+ vrf_id);
} else {
- retval = sctp_tcb_special_locate(&inp, from, to, netp, vrf_id);
+ retval = sctp_tcb_special_locate(&inp, from, to, netp,
+ vrf_id);
}
if (retval != NULL) {
SCTP_INP_INFO_RUNLOCK();
@@ -1307,9 +1310,11 @@ sctp_findassociation_addr_sa(struct sockaddr *to, struct sockaddr *from,
* inbound packet side.
*/
if (inp_p != NULL) {
- retval = sctp_findassociation_ep_addr(inp_p, from, netp, to, NULL);
+ retval = sctp_findassociation_ep_addr(inp_p, from, netp, to,
+ NULL);
} else {
- retval = sctp_findassociation_ep_addr(&inp, from, netp, to, NULL);
+ retval = sctp_findassociation_ep_addr(&inp, from, netp, to,
+ NULL);
}
return retval;
}
@@ -2216,7 +2221,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
}
}
} else {
- uint16_t first, last, candiate;
+ uint16_t first, last, candidate;
uint16_t count;
int done;
@@ -2246,11 +2251,11 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
last = temp;
}
count = last - first + 1; /* number of candidates */
- candiate = first + sctp_select_initial_TSN(&inp->sctp_ep) % (count);
+ candidate = first + sctp_select_initial_TSN(&inp->sctp_ep) % (count);
done = 0;
while (!done) {
- if (sctp_isport_inuse(inp, htons(candiate), inp->def_vrf_id) == 0) {
+ if (sctp_isport_inuse(inp, htons(candidate), inp->def_vrf_id) == 0) {
done = 1;
}
if (!done) {
@@ -2260,13 +2265,13 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, struct thread *p)
SCTP_INP_INFO_WUNLOCK();
return (EADDRINUSE);
}
- if (candiate == last)
- candiate = first;
+ if (candidate == last)
+ candidate = first;
else
- candiate = candiate + 1;
+ candidate = candidate + 1;
}
}
- lport = htons(candiate);
+ lport = htons(candidate);
}
SCTP_INP_DECR_REF(inp);
if (inp->sctp_flags & (SCTP_PCB_FLAGS_SOCKET_GONE |
@@ -3063,6 +3068,7 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr,
* initial value
*/
net->RTO = 0;
+ net->RTO_measured = 0;
stcb->asoc.numnets++;
*(&net->ref_count) = 1;
net->tos_flowlabel = 0;
OpenPOWER on IntegriCloud