svn commit: r332201 - stable/11/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sat Apr 7 19:14:32 UTC 2018
Author: tuexen
Date: Sat Apr 7 19:14:31 2018
New Revision: 332201
URL: https://svnweb.freebsd.org/changeset/base/332201
Log:
MFC r323861:
Code cleanup, no functional change.
Modified:
stable/11/sys/netinet/sctp_constants.h
stable/11/sys/netinet/sctp_input.c
stable/11/sys/netinet/sctp_output.c
stable/11/sys/netinet/sctp_output.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/netinet/sctp_constants.h
==============================================================================
--- stable/11/sys/netinet/sctp_constants.h Sat Apr 7 19:13:05 2018 (r332200)
+++ stable/11/sys/netinet/sctp_constants.h Sat Apr 7 19:14:31 2018 (r332201)
@@ -969,9 +969,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_SO_NOT_LOCKED 0
-#define SCTP_HOLDS_LOCK 1
-#define SCTP_NOT_LOCKED 0
-
/*-
* For address locks, do we hold the lock?
*/
Modified: stable/11/sys/netinet/sctp_input.c
==============================================================================
--- stable/11/sys/netinet/sctp_input.c Sat Apr 7 19:13:05 2018 (r332200)
+++ stable/11/sys/netinet/sctp_input.c Sat Apr 7 19:14:31 2018 (r332201)
@@ -199,8 +199,7 @@ sctp_handle_init(struct mbuf *m, int iphlen, int offse
sctp_send_initiate_ack(inp, stcb, net, m, iphlen, offset,
src, dst, sh, cp,
mflowtype, mflowid,
- vrf_id, port,
- ((stcb == NULL) ? SCTP_HOLDS_LOCK : SCTP_NOT_LOCKED));
+ vrf_id, port);
}
outnow:
if (stcb == NULL) {
Modified: stable/11/sys/netinet/sctp_output.c
==============================================================================
--- stable/11/sys/netinet/sctp_output.c Sat Apr 7 19:13:05 2018 (r332200)
+++ stable/11/sys/netinet/sctp_output.c Sat Apr 7 19:14:31 2018 (r332201)
@@ -5491,7 +5491,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct
struct sockaddr *src, struct sockaddr *dst,
struct sctphdr *sh, struct sctp_init_chunk *init_chk,
uint8_t mflowtype, uint32_t mflowid,
- uint32_t vrf_id, uint16_t port, int hold_inp_lock)
+ uint32_t vrf_id, uint16_t port)
{
struct sctp_association *asoc;
struct mbuf *m, *m_tmp, *m_last, *m_cookie, *op_err;
@@ -5839,10 +5839,6 @@ do_a_abort:
} else {
uint32_t vtag, itsn;
- if (hold_inp_lock) {
- SCTP_INP_INCR_REF(inp);
- SCTP_INP_RUNLOCK(inp);
- }
if (asoc) {
atomic_add_int(&asoc->refcnt, 1);
SCTP_TCB_UNLOCK(stcb);
@@ -5862,12 +5858,12 @@ do_a_abort:
SCTP_TCB_LOCK(stcb);
atomic_add_int(&asoc->refcnt, -1);
} else {
+ SCTP_INP_INCR_REF(inp);
+ SCTP_INP_RUNLOCK(inp);
vtag = sctp_select_a_tag(inp, inp->sctp_lport, sh->src_port, 1);
initack->init.initiate_tag = htonl(vtag);
/* get a TSN to use too */
initack->init.initial_tsn = htonl(sctp_select_initial_TSN(&inp->sctp_ep));
- }
- if (hold_inp_lock) {
SCTP_INP_RLOCK(inp);
SCTP_INP_DECR_REF(inp);
}
Modified: stable/11/sys/netinet/sctp_output.h
==============================================================================
--- stable/11/sys/netinet/sctp_output.h Sat Apr 7 19:13:05 2018 (r332200)
+++ stable/11/sys/netinet/sctp_output.h Sat Apr 7 19:14:31 2018 (r332201)
@@ -86,7 +86,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *, struct sct
struct sockaddr *, struct sockaddr *,
struct sctphdr *, struct sctp_init_chunk *,
uint8_t, uint32_t,
- uint32_t, uint16_t, int);
+ uint32_t, uint16_t);
struct mbuf *
sctp_arethere_unrecognized_parameters(struct mbuf *, int, int *,
More information about the svn-src-stable
mailing list