Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2020 08:08:12 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r364611 - stable/12/sys/netinet
Message-ID:  <202008240808.07O88CdV058498@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Mon Aug 24 08:08:12 2020
New Revision: 364611
URL: https://svnweb.freebsd.org/changeset/base/364611

Log:
  MFC r362173:
  Cleanups, no functional change.

Modified:
  stable/12/sys/netinet/sctp_indata.c
  stable/12/sys/netinet/sctp_output.c
  stable/12/sys/netinet/sctp_ss_functions.c
  stable/12/sys/netinet/sctputil.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/sctp_indata.c
==============================================================================
--- stable/12/sys/netinet/sctp_indata.c	Mon Aug 24 08:01:09 2020	(r364610)
+++ stable/12/sys/netinet/sctp_indata.c	Mon Aug 24 08:08:12 2020	(r364611)
@@ -66,7 +66,7 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *co
     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

Modified: stable/12/sys/netinet/sctp_output.c
==============================================================================
--- stable/12/sys/netinet/sctp_output.c	Mon Aug 24 08:01:09 2020	(r364610)
+++ stable/12/sys/netinet/sctp_output.c	Mon Aug 24 08:08:12 2020	(r364611)
@@ -5124,7 +5124,6 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_
 					}
 				}
 				return (op_err);
-				break;
 			}
 		default:
 			/*

Modified: stable/12/sys/netinet/sctp_ss_functions.c
==============================================================================
--- stable/12/sys/netinet/sctp_ss_functions.c	Mon Aug 24 08:01:09 2020	(r364610)
+++ stable/12/sys/netinet/sctp_ss_functions.c	Mon Aug 24 08:08:12 2020	(r364611)
@@ -767,8 +767,8 @@ sctp_ss_fb_scheduled(struct sctp_tcb *stcb, struct sct
  */
 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,

Modified: stable/12/sys/netinet/sctputil.c
==============================================================================
--- stable/12/sys/netinet/sctputil.c	Mon Aug 24 08:01:09 2020	(r364610)
+++ stable/12/sys/netinet/sctputil.c	Mon Aug 24 08:08:12 2020	(r364611)
@@ -5221,10 +5221,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc
 			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 soc
 			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 soc
 	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 
 			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 
 			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 
 	}
 	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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008240808.07O88CdV058498>