svn commit: r307216 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Thu Oct 13 13:38:16 UTC 2016


Author: tuexen
Date: Thu Oct 13 13:38:14 2016
New Revision: 307216
URL: https://svnweb.freebsd.org/changeset/base/307216

Log:
  Whitespace changes.
  
  MFC after: 1 month

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Thu Oct 13 11:40:34 2016	(r307215)
+++ head/sys/netinet/sctp_pcb.c	Thu Oct 13 13:38:14 2016	(r307216)
@@ -77,7 +77,6 @@ SCTP6_ARE_ADDR_EQUAL(struct sockaddr_in6
 	}
 	return (IN6_ARE_ADDR_EQUAL(&tmp_a.sin6_addr, &tmp_b.sin6_addr));
 }
-
 #endif
 
 void
@@ -837,14 +836,11 @@ static int
 sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to)
 {
 	int loopback_scope;
-
 #if defined(INET)
 	int ipv4_local_scope, ipv4_addr_legal;
-
 #endif
 #if defined(INET6)
 	int local_scope, site_scope, ipv6_addr_legal;
-
 #endif
 	struct sctp_vrf *vrf;
 	struct sctp_ifn *sctp_ifn;
@@ -1216,10 +1212,8 @@ sctp_tcb_special_locate(struct sctp_inpc
 						if (netp != NULL) {
 							*netp = net;
 						}
-						/*
-						 * Update the endpoint
-						 * pointer
-						 */
+						/* Update the endpoint
+						 * pointer */
 						*inp_p = inp;
 						SCTP_INP_RUNLOCK(inp);
 						return (stcb);
@@ -1240,10 +1234,8 @@ sctp_tcb_special_locate(struct sctp_inpc
 						if (netp != NULL) {
 							*netp = net;
 						}
-						/*
-						 * Update the endpoint
-						 * pointer
-						 */
+						/* Update the endpoint
+						 * pointer */
 						*inp_p = inp;
 						SCTP_INP_RUNLOCK(inp);
 						return (stcb);
@@ -1622,15 +1614,12 @@ sctp_endpoint_probe(struct sockaddr *nam
 {
 	struct sctp_inpcb *inp;
 	struct sctp_laddr *laddr;
-
 #ifdef INET
 	struct sockaddr_in *sin;
-
 #endif
 #ifdef INET6
 	struct sockaddr_in6 *sin6;
 	struct sockaddr_in6 *intf_addr6;
-
 #endif
 	int fnd;
 
@@ -1673,10 +1662,8 @@ sctp_endpoint_probe(struct sockaddr *nam
 			case AF_INET:
 				if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
 				    SCTP_IPV6_V6ONLY(inp)) {
-					/*
-					 * IPv4 on a IPv6 socket with ONLY
-					 * IPv6 set
-					 */
+					/* IPv4 on a IPv6 socket with ONLY
+					 * IPv6 set */
 					SCTP_INP_RUNLOCK(inp);
 					continue;
 				}
@@ -1689,10 +1676,8 @@ sctp_endpoint_probe(struct sockaddr *nam
 #endif
 #ifdef INET6
 			case AF_INET6:
-				/*
-				 * A V6 address and the endpoint is NOT
-				 * bound V6
-				 */
+				/* A V6 address and the endpoint is NOT
+				 * bound V6 */
 				if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) {
 					SCTP_INP_RUNLOCK(inp);
 					continue;
@@ -1926,14 +1911,11 @@ sctp_pcb_findep(struct sockaddr *nam, in
 	struct sctppcbhead *head;
 	int lport;
 	unsigned int i;
-
 #ifdef INET
 	struct sockaddr_in *sin;
-
 #endif
 #ifdef INET6
 	struct sockaddr_in6 *sin6;
-
 #endif
 
 	switch (nam->sa_family) {
@@ -2057,21 +2039,16 @@ sctp_findassociation_special_addr(struct
     struct sockaddr *dst)
 {
 	struct sctp_paramhdr *phdr, parm_buf;
-
 #if defined(INET) || defined(INET6)
 	struct sctp_tcb *stcb;
 	uint16_t ptype;
-
 #endif
 	uint16_t plen;
-
 #ifdef INET
 	struct sockaddr_in sin4;
-
 #endif
 #ifdef INET6
 	struct sockaddr_in6 sin6;
-
 #endif
 
 #ifdef INET
@@ -2198,10 +2175,8 @@ sctp_findassoc_by_vtag(struct sockaddr *
 				continue;
 			}
 			if (remote_tag) {
-				/*
-				 * If we have both vtags that's all we match
-				 * on
-				 */
+				/* If we have both vtags that's all we match
+				 * on */
 				if (stcb->asoc.peer_vtag == remote_tag) {
 					/*
 					 * If both tags match we consider it
@@ -2319,14 +2294,11 @@ sctp_findassociation_ep_asconf(struct mb
 	struct sctp_paramhdr parm_buf, *phdr;
 	int ptype;
 	int zero_address = 0;
-
 #ifdef INET
 	struct sockaddr_in *sin;
-
 #endif
 #ifdef INET6
 	struct sockaddr_in6 *sin6;
-
 #endif
 
 	memset(&remote_store, 0, sizeof(remote_store));
@@ -2897,10 +2869,8 @@ sctp_inpcb_bind(struct socket *so, struc
 #ifdef INET6
 		case AF_INET6:
 			{
-				/*
-				 * Only for pure IPv6 Address. (No IPv4
-				 * Mapped!)
-				 */
+				/* Only for pure IPv6 Address. (No IPv4
+				 * Mapped!) */
 				struct sockaddr_in6 *sin6;
 
 				sin6 = (struct sockaddr_in6 *)addr;
@@ -2977,10 +2947,8 @@ sctp_inpcb_bind(struct socket *so, struc
 				/* unlock info */
 				if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PORTREUSE)) &&
 				    (sctp_is_feature_on(inp_tmp, SCTP_PCB_FLAGS_PORTREUSE))) {
-					/*
-					 * Ok, must be one-2-one and
-					 * allowing port re-use
-					 */
+					/* Ok, must be one-2-one and
+					 * allowing port re-use */
 					port_reuse_active = 1;
 					goto continue_anyway;
 				}
@@ -3003,10 +2971,8 @@ sctp_inpcb_bind(struct socket *so, struc
 				/* unlock info */
 				if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_PORTREUSE)) &&
 				    (sctp_is_feature_on(inp_tmp, SCTP_PCB_FLAGS_PORTREUSE))) {
-					/*
-					 * Ok, must be one-2-one and
-					 * allowing port re-use
-					 */
+					/* Ok, must be one-2-one and
+					 * allowing port re-use */
 					port_reuse_active = 1;
 					goto continue_anyway;
 				}
@@ -3146,11 +3112,11 @@ continue_anyway:
 		 * bind specific, make sure flags is off and add a new
 		 * address structure to the sctp_addr_list inside the ep
 		 * structure.
-		 * 
-		 * We will need to allocate one and insert it at the head. The
-		 * socketopt call can just insert new addresses in there as
-		 * well. It will also have to do the embed scope kame hack
-		 * too (before adding).
+		 *
+		 * We will need to allocate one and insert it at the head.
+		 * The socketopt call can just insert new addresses in there
+		 * as well. It will also have to do the embed scope kame
+		 * hack too (before adding).
 		 */
 		struct sctp_ifa *ifa;
 		union sctp_sockstore store;
@@ -3268,11 +3234,11 @@ sctp_iterator_inp_being_freed(struct sct
 		 * from happening. But of course the iterator has a
 		 * reference on the stcb and inp. We can mark it and it will
 		 * stop.
-		 * 
-		 * If its a single iterator situation, we set the end iterator
-		 * flag. Otherwise we set the iterator to go to the next
-		 * inp.
-		 * 
+		 *
+		 * If its a single iterator situation, we set the end
+		 * iterator flag. Otherwise we set the iterator to go to the
+		 * next inp.
+		 *
 		 */
 		if (it->iterator_flags & SCTP_ITERATOR_DO_SINGLE_INP) {
 			sctp_it_ctl.iterator_flags |= SCTP_ITERATOR_STOP_CUR_IT;
@@ -3305,10 +3271,8 @@ sctp_iterator_inp_being_freed(struct sct
 					SCTP_INP_INCR_REF(it->inp);
 				}
 			}
-			/*
-			 * When its put in the refcnt is incremented so decr
-			 * it
-			 */
+			/* When its put in the refcnt is incremented so decr
+			 * it */
 			SCTP_INP_DECR_REF(inp);
 		}
 	}
@@ -3991,10 +3955,8 @@ sctp_add_remote_addr(struct sctp_tcb *st
 
 			rmtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, net->ro.ro_rt);
 			if (rmtu == 0) {
-				/*
-				 * Start things off to match mtu of
-				 * interface please.
-				 */
+				/* Start things off to match mtu of
+				 * interface please. */
 				SCTP_SET_MTU_OF_ROUTE(&net->ro._l_addr.sa,
 				    net->ro.ro_rt, net->mtu);
 			} else {
@@ -5484,10 +5446,8 @@ sctp_del_local_addr_ep(struct sctp_inpcb
 			if (stcb->asoc.last_used_address == laddr)
 				/* delete this address */
 				stcb->asoc.last_used_address = NULL;
-			/*
-			 * Now spin through all the nets and purge any ref
-			 * to laddr
-			 */
+			/* Now spin through all the nets and purge any ref
+			 * to laddr */
 			TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
 				if (net->ro._s_addr == laddr->ifa) {
 					/* Yep, purge src address selected */
@@ -5755,7 +5715,6 @@ sctp_startup_mcore_threads(void)
 
 	}
 }
-
 #endif
 
 void
@@ -6097,14 +6056,11 @@ sctp_load_addresses_from_init(struct sct
 	uint8_t peer_supports_nrsack;
 	uint8_t peer_supports_pktdrop;
 	uint8_t peer_supports_idata;
-
 #ifdef INET
 	struct sockaddr_in sin;
-
 #endif
 #ifdef INET6
 	struct sockaddr_in6 sin6;
-
 #endif
 
 	/* First get the destination address setup too. */
@@ -6267,10 +6223,8 @@ sctp_load_addresses_from_init(struct sct
 							struct mbuf *op_err;
 							char msg[SCTP_DIAG_INFO_LEN];
 
-							/*
-							 * in setup state we
-							 * abort this guy
-							 */
+							/* in setup state we
+							 * abort this guy */
 							snprintf(msg, sizeof(msg),
 							    "%s:%d at %s", __FILE__, __LINE__, __func__);
 							op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code),
@@ -6312,10 +6266,8 @@ sctp_load_addresses_from_init(struct sct
 					goto next_param;
 				}
 				if (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr)) {
-					/*
-					 * Link local make no sense without
-					 * scope
-					 */
+					/* Link local make no sense without
+					 * scope */
 					goto next_param;
 				}
 				sa = (struct sockaddr *)&sin6;
@@ -6366,10 +6318,8 @@ sctp_load_addresses_from_init(struct sct
 							struct mbuf *op_err;
 							char msg[SCTP_DIAG_INFO_LEN];
 
-							/*
-							 * in setup state we
-							 * abort this guy
-							 */
+							/* in setup state we
+							 * abort this guy */
 							snprintf(msg, sizeof(msg),
 							    "%s:%d at %s", __FILE__, __LINE__, __func__);
 							op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code),
@@ -6409,10 +6359,8 @@ sctp_load_addresses_from_init(struct sct
 			struct sctp_asconf_addr_param lstore, *fee;
 			int lptype;
 			struct sockaddr *lsa = NULL;
-
 #ifdef INET
 			struct sctp_asconf_addrv4_param *fii;
-
 #endif
 
 			if (stcb->asoc.asconf_supported == 0) {


More information about the svn-src-all mailing list