aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2020-08-24 08:08:12 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2020-08-24 08:08:12 +0000
commite4392a53b75fa37bf3198ff39602c426da4211cf (patch)
tree552afe2edf12b2e404f8acfcd8a2c2b181043db4 /sys/netinet
parent36f0154512c777d79d59e1b5854bbbe2a9bc2611 (diff)
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_indata.c2
-rw-r--r--sys/netinet/sctp_output.c1
-rw-r--r--sys/netinet/sctp_ss_functions.c4
-rw-r--r--sys/netinet/sctputil.c20
4 files changed, 6 insertions, 21 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index aec59b760bbb..79ae9b7bdf19 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -66,7 +66,7 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *control,
struct sctp_stream_in *strm,
struct sctp_tcb *stcb,
struct sctp_association *asoc,
- struct sctp_tmit_chunk *chk, int lock_held);
+ struct sctp_tmit_chunk *chk, int hold_rlock);
void
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index da2369956058..9ec4b0a19846 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -5124,7 +5124,6 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt,
}
}
return (op_err);
- break;
}
default:
/*
diff --git a/sys/netinet/sctp_ss_functions.c b/sys/netinet/sctp_ss_functions.c
index 8c930ac99d42..e4fb71209483 100644
--- a/sys/netinet/sctp_ss_functions.c
+++ b/sys/netinet/sctp_ss_functions.c
@@ -767,8 +767,8 @@ sctp_ss_fb_scheduled(struct sctp_tcb *stcb, struct sctp_nets *net SCTP_UNUSED,
*/
static void
sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
- struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
- int holds_lock);
+ struct sctp_stream_out *strq SCTP_UNUSED,
+ struct sctp_stream_queue_pending *sp, int holds_lock);
static void
sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index e7036efe476e..d7a11fc14d31 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -5221,10 +5221,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct sockaddr *addr,
if (((struct sockaddr_in *)addr)->sin_addr.s_addr ==
laddr->ifa->address.sin.sin_addr.s_addr) {
/* found him. */
- if (holds_lock == 0) {
- SCTP_INP_RUNLOCK(inp);
- }
- return (laddr->ifa);
break;
}
}
@@ -5234,10 +5230,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct sockaddr *addr,
if (SCTP6_ARE_ADDR_EQUAL((struct sockaddr_in6 *)addr,
&laddr->ifa->address.sin6)) {
/* found him. */
- if (holds_lock == 0) {
- SCTP_INP_RUNLOCK(inp);
- }
- return (laddr->ifa);
break;
}
}
@@ -5246,7 +5238,7 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct sockaddr *addr,
if (holds_lock == 0) {
SCTP_INP_RUNLOCK(inp);
}
- return (NULL);
+ return (laddr->ifa);
}
uint32_t
@@ -5323,9 +5315,6 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t vrf_id, int holds_lock)
if (((struct sockaddr_in *)addr)->sin_addr.s_addr ==
sctp_ifap->address.sin.sin_addr.s_addr) {
/* found him. */
- if (holds_lock == 0)
- SCTP_IPI_ADDR_RUNLOCK();
- return (sctp_ifap);
break;
}
}
@@ -5335,9 +5324,6 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t vrf_id, int holds_lock)
if (SCTP6_ARE_ADDR_EQUAL((struct sockaddr_in6 *)addr,
&sctp_ifap->address.sin6)) {
/* found him. */
- if (holds_lock == 0)
- SCTP_IPI_ADDR_RUNLOCK();
- return (sctp_ifap);
break;
}
}
@@ -5345,7 +5331,7 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t vrf_id, int holds_lock)
}
if (holds_lock == 0)
SCTP_IPI_ADDR_RUNLOCK();
- return (NULL);
+ return (sctp_ifap);
}
static void
@@ -6918,7 +6904,7 @@ sctp_local_addr_count(struct sctp_tcb *stcb)
#if defined(INET)
int ipv4_local_scope, ipv4_addr_legal;
#endif
-#if defined (INET6)
+#if defined(INET6)
int local_scope, site_scope, ipv6_addr_legal;
#endif
struct sctp_vrf *vrf;