git: 83a8f49acf8b - stable/12 - ipfilter module: Fix whitespace errors

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Mon, 07 Feb 2022 13:56:01 UTC
The branch stable/12 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=83a8f49acf8bee7767b2bd5e5339b9bc1ad4f8dd

commit 83a8f49acf8bee7767b2bd5e5339b9bc1ad4f8dd
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-12-22 04:53:03 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-02-07 13:55:12 +0000

    ipfilter module: Fix whitespace errors
    
    Replace leading spaces with a tabs on affected lines.
    
    (cherry picked from commit 80030b6cc734cc50c20d87de99bb631a06888f37)
---
 sys/netpfil/ipfilter/netinet/fil.c            |  2 +-
 sys/netpfil/ipfilter/netinet/ip_dns_pxy.c     |  2 +-
 sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c |  4 +-
 sys/netpfil/ipfilter/netinet/ip_frag.c        |  6 +--
 sys/netpfil/ipfilter/netinet/ip_htable.c      |  4 +-
 sys/netpfil/ipfilter/netinet/ip_nat6.c        | 20 ++++-----
 sys/netpfil/ipfilter/netinet/ip_proxy.c       |  6 +--
 sys/netpfil/ipfilter/netinet/ip_proxy.h       | 10 ++---
 sys/netpfil/ipfilter/netinet/ip_rpcb_pxy.c    | 62 +++++++++++++--------------
 sys/netpfil/ipfilter/netinet/ip_state.c       |  2 +-
 sys/netpfil/ipfilter/netinet/ip_sync.c        |  2 +-
 sys/netpfil/ipfilter/netinet/ip_tftp_pxy.c    |  2 +-
 12 files changed, 61 insertions(+), 61 deletions(-)

diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c
index db40418f0241..ca0c12a2dddf 100644
--- a/sys/netpfil/ipfilter/netinet/fil.c
+++ b/sys/netpfil/ipfilter/netinet/fil.c
@@ -4613,7 +4613,7 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data,
 	ftail = NULL;
 	fprev = NULL;
 	if (unit == IPL_LOGAUTH) {
-                if ((fp->fr_tifs[0].fd_ptr != NULL) ||
+		if ((fp->fr_tifs[0].fd_ptr != NULL) ||
 		    (fp->fr_tifs[1].fd_ptr != NULL) ||
 		    (fp->fr_dif.fd_ptr != NULL) ||
 		    (fp->fr_flags & FR_FASTROUTE)) {
diff --git a/sys/netpfil/ipfilter/netinet/ip_dns_pxy.c b/sys/netpfil/ipfilter/netinet/ip_dns_pxy.c
index e03443b49160..722915bf4d9c 100644
--- a/sys/netpfil/ipfilter/netinet/ip_dns_pxy.c
+++ b/sys/netpfil/ipfilter/netinet/ip_dns_pxy.c
@@ -189,7 +189,7 @@ ipf_p_dns_new(void *arg, fr_info_t *fin, ap_session_t *aps, nat_t *nat)
 	if (di == NULL) {
 		printf("ipf_dns_new:KMALLOCS(%d) failed\n", sizeof(*di));
 		return(-1);
-        }
+	}
 
 	MUTEX_INIT(&di->dnsi_lock, "dns lock");
 
diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
index 363c1e6907b3..f09e8871063a 100644
--- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
+++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
@@ -184,7 +184,7 @@ ipf_timer_func(void *arg)
 	SPL_NET(s);
 	READ_ENTER(&softc->ipf_global);
 
-        if (softc->ipf_running > 0)
+	if (softc->ipf_running > 0)
 		ipf_slowtimer(softc);
 
 	if (softc->ipf_running == -1 || softc->ipf_running == 1) {
@@ -284,7 +284,7 @@ ipfioctl(struct cdev *dev, ioctlcmd_t cmd, caddr_t data,
 	SPL_INT(s);
 
 	CURVNET_SET(TD_TO_VNET(p));
-        if (securelevel_ge(p->p_cred, 3) && (mode & FWRITE))
+	if (securelevel_ge(p->p_cred, 3) && (mode & FWRITE))
 	{
 		V_ipfmain.ipf_interror = 130001;
 		CURVNET_RESTORE();
diff --git a/sys/netpfil/ipfilter/netinet/ip_frag.c b/sys/netpfil/ipfilter/netinet/ip_frag.c
index 4eb2faf70def..73725d9c64d9 100644
--- a/sys/netpfil/ipfilter/netinet/ip_frag.c
+++ b/sys/netpfil/ipfilter/netinet/ip_frag.c
@@ -1207,14 +1207,14 @@ ipf_frag_next(ipf_main_softc_t *softc, ipftoken_t *token, ipfgeniter_t *itp,
 	if (error != 0)
 		IPFERROR(20002);
 
-        if (frag != NULL) {
+	if (frag != NULL) {
 #ifdef USE_MUTEXES
 		ipf_frag_deref(softc, &frag, lock);
 #else
 		ipf_frag_deref(softc, &frag);
 #endif
-        }
-        return(error);
+	}
+	return(error);
 }
 
 
diff --git a/sys/netpfil/ipfilter/netinet/ip_htable.c b/sys/netpfil/ipfilter/netinet/ip_htable.c
index 773cd849e042..b0c32bd6e930 100644
--- a/sys/netpfil/ipfilter/netinet/ip_htable.c
+++ b/sys/netpfil/ipfilter/netinet/ip_htable.c
@@ -505,8 +505,8 @@ static int
 ipf_htable_node_del(ipf_main_softc_t *softc, void *arg, iplookupop_t *op,
 	int uid)
 {
-        iphtable_t *iph;
-        iphtent_t hte, *ent;
+	iphtable_t *iph;
+	iphtent_t hte, *ent;
 	int err;
 
 	if (op->iplo_size != sizeof(hte)) {
diff --git a/sys/netpfil/ipfilter/netinet/ip_nat6.c b/sys/netpfil/ipfilter/netinet/ip_nat6.c
index 92f530031f5c..a894b8e56eca 100644
--- a/sys/netpfil/ipfilter/netinet/ip_nat6.c
+++ b/sys/netpfil/ipfilter/netinet/ip_nat6.c
@@ -606,18 +606,18 @@ ipf_nat6_newmap(fr_info_t *fin, nat_t *nat, natinfo_t *ni)
 
 		} else if (((np->in_redir & NAT_MAPBLK) == 0) &&
 			   (flags & IPN_TCPUDPICMP) && (np->in_spnext != 0)) {
-                        /*
-                         * Standard port translation.  Select next port.
-                         */
-                        if (np->in_flags & IPN_SEQUENTIAL) {
-                                port = np->in_spnext;
-                        } else {
+		        /*
+		         * Standard port translation.  Select next port.
+		         */
+		        if (np->in_flags & IPN_SEQUENTIAL) {
+		                port = np->in_spnext;
+		        } else {
 				port = ipf_random() % (np->in_spmax -
 						       np->in_spmin + 1);
-                                port += np->in_spmin;
-                        }
-                        port = htons(port);
-                        np->in_spnext++;
+		                port += np->in_spmin;
+		        }
+		        port = htons(port);
+		        np->in_spnext++;
 
 			if (np->in_spnext > np->in_spmax) {
 				np->in_spnext = np->in_spmin;
diff --git a/sys/netpfil/ipfilter/netinet/ip_proxy.c b/sys/netpfil/ipfilter/netinet/ip_proxy.c
index dfba2263b085..2d4966d786c9 100644
--- a/sys/netpfil/ipfilter/netinet/ip_proxy.c
+++ b/sys/netpfil/ipfilter/netinet/ip_proxy.c
@@ -490,9 +490,9 @@ ipf_proxy_soft_destroy(ipf_main_softc_t *softc, void *arg)
 	}
 
 	if (softp->ipf_proxy_tune != NULL) {
-                ipf_tune_array_unlink(softc, softp->ipf_proxy_tune);
-                KFREES(softp->ipf_proxy_tune, sizeof(ipf_proxy_tuneables));
-                softp->ipf_proxy_tune = NULL;
+		ipf_tune_array_unlink(softc, softp->ipf_proxy_tune);
+		KFREES(softp->ipf_proxy_tune, sizeof(ipf_proxy_tuneables));
+		softp->ipf_proxy_tune = NULL;
 	}
 
 	KFREE(softp);
diff --git a/sys/netpfil/ipfilter/netinet/ip_proxy.h b/sys/netpfil/ipfilter/netinet/ip_proxy.h
index 0f67b5e2cca5..79fbdcb1dfe7 100644
--- a/sys/netpfil/ipfilter/netinet/ip_proxy.h
+++ b/sys/netpfil/ipfilter/netinet/ip_proxy.h
@@ -216,7 +216,7 @@ typedef	struct	ircinfo {
  * For the DNS "proxy"
  */
 typedef struct dnsinfo {
-        ipfmutex_t	dnsi_lock;
+	ipfmutex_t	dnsi_lock;
 	u_short		dnsi_id;
 	char		dnsi_buffer[512];
 } dnsinfo_t;
@@ -286,10 +286,10 @@ typedef	struct	msnrpcinfo	{
  */
 #define RPCB_BUF_END(r) (char *)((r)->rm_msgbuf + (r)->rm_buflen)
 #define RPCB_BUF_GEQ(r, p, l)   \
-        ((RPCB_BUF_END((r)) > (char *)(p)) &&           \
-         ((RPCB_BUF_END((r)) - (char *)(p)) >= (l)))
+	((RPCB_BUF_END((r)) > (char *)(p)) &&           \
+	 ((RPCB_BUF_END((r)) - (char *)(p)) >= (l)))
 #define	RPCB_BUF_EQ(r, p, l)                            \
-        (RPCB_BUF_END((r)) == ((char *)(p) + (l)))
+	(RPCB_BUF_END((r)) == ((char *)(p) + (l)))
 
 /*
  * The following correspond to RPC(B) detailed in RFC183[13].
@@ -428,7 +428,7 @@ typedef struct rpcb_xact {
 } rpcb_xact_t;
 
 typedef struct rpcb_session {
-        ipfmutex_t	rs_rxlock;
+	ipfmutex_t	rs_rxlock;
 	rpcb_xact_t	*rs_rxlist;
 } rpcb_session_t;
 
diff --git a/sys/netpfil/ipfilter/netinet/ip_rpcb_pxy.c b/sys/netpfil/ipfilter/netinet/ip_rpcb_pxy.c
index 595c5261d672..b70d6b55285b 100644
--- a/sys/netpfil/ipfilter/netinet/ip_rpcb_pxy.c
+++ b/sys/netpfil/ipfilter/netinet/ip_rpcb_pxy.c
@@ -307,11 +307,11 @@ ipf_p_rpcb_out(void *arg, fr_info_t *fin, ap_session_t *aps, nat_t *nat)
 	switch(rv)
 	{
 	case -1: /* Bad packet */
-                if (rx != NULL) {
-                        MUTEX_ENTER(&rs->rs_rxlock);
-                        ipf_p_rpcb_deref(rs, rx);
-                        MUTEX_EXIT(&rs->rs_rxlock);
-                }
+		if (rx != NULL) {
+		        MUTEX_ENTER(&rs->rs_rxlock);
+		        ipf_p_rpcb_deref(rs, rx);
+		        MUTEX_EXIT(&rs->rs_rxlock);
+		}
 		return(APR_ERR(1));
 		/*NOTREACHED*/
 		break;
@@ -338,16 +338,16 @@ ipf_p_rpcb_out(void *arg, fr_info_t *fin, ap_session_t *aps, nat_t *nat)
 	}
 
 	if (rx != NULL) {
-                MUTEX_ENTER(&rs->rs_rxlock);
-                /* XXX Gross hack - I'm overloading the reference
-                 * counter to deal with both threads and retransmitted
-                 * requests.  One deref signals that this thread is
-                 * finished with rx, and the other signals that we've
-                 * processed its reply.
-                 */
-                ipf_p_rpcb_deref(rs, rx);
-                ipf_p_rpcb_deref(rs, rx);
-                MUTEX_EXIT(&rs->rs_rxlock);
+		MUTEX_ENTER(&rs->rs_rxlock);
+		/* XXX Gross hack - I'm overloading the reference
+		 * counter to deal with both threads and retransmitted
+		 * requests.  One deref signals that this thread is
+		 * finished with rx, and the other signals that we've
+		 * processed its reply.
+		 */
+		ipf_p_rpcb_deref(rs, rx);
+		ipf_p_rpcb_deref(rs, rx);
+		MUTEX_EXIT(&rs->rs_rxlock);
 	}
 
 	return(diff);
@@ -492,12 +492,12 @@ ipf_p_rpcb_decodereq(fr_info_t *fin, nat_t *nat, rpcb_session_t *rs,
 		return(-1);
 	}
 
-        MUTEX_ENTER(&rs->rs_rxlock);
+	MUTEX_ENTER(&rs->rs_rxlock);
 	if (ipf_p_rpcb_insert(rs, &rx) != 0) {
-                MUTEX_EXIT(&rs->rs_rxlock);
+		MUTEX_EXIT(&rs->rs_rxlock);
 		return(-1);
 	}
-        MUTEX_EXIT(&rs->rs_rxlock);
+	MUTEX_EXIT(&rs->rs_rxlock);
 
 	return(mod);
 }
@@ -556,9 +556,9 @@ ipf_p_rpcb_insert(rpcb_session_t *rs, rpcb_xact_t *rx)
 
 	rxp = ipf_p_rpcb_lookup(rs, rx->rx_xid);
 	if (rxp != NULL) {
-                ++rxp->rx_ref;
+		++rxp->rx_ref;
 		return(0);
-        }
+	}
 
 	if (V_rpcbcnt == RPCB_MAXREQS)
 		return(-1);
@@ -837,13 +837,13 @@ ipf_p_rpcb_decoderep(fr_info_t *fin, nat_t *nat, rpcb_session_t *rs,
 	xdr = B(p++);		/* Record this message's XID. */
 
 	/* Lookup XID */
-        MUTEX_ENTER(&rs->rs_rxlock);
+	MUTEX_ENTER(&rs->rs_rxlock);
 	if ((rx = ipf_p_rpcb_lookup(rs, xdr)) == NULL) {
-                MUTEX_EXIT(&rs->rs_rxlock);
+		MUTEX_EXIT(&rs->rs_rxlock);
 		return(-1);
-        }
-        ++rx->rx_ref;        /* per thread reference */
-        MUTEX_EXIT(&rs->rs_rxlock);
+	}
+	++rx->rx_ref;        /* per thread reference */
+	MUTEX_EXIT(&rs->rs_rxlock);
 
 	*rxp = rx;
 
@@ -1392,13 +1392,13 @@ ipf_p_rpcb_modv4(fr_info_t *fin, nat_t *nat, rpc_msg_t *rm, mb_t *m,
 static void
 ipf_p_rpcb_fixlen(fr_info_t *fin, int len)
 {
-        udphdr_t *udp;
+	udphdr_t *udp;
 
-        udp = fin->fin_dp;
-        udp->uh_ulen = htons(ntohs(udp->uh_ulen) + len);
-        fin->fin_plen += len;
-        fin->fin_ip->ip_len = htons(fin->fin_plen);
-        fin->fin_dlen += len;
+	udp = fin->fin_dp;
+	udp->uh_ulen = htons(ntohs(udp->uh_ulen) + len);
+	fin->fin_plen += len;
+	fin->fin_ip->ip_len = htons(fin->fin_plen);
+	fin->fin_dlen += len;
 }
 
 #undef B
diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c
index 888099d37d79..f5dbef531aa9 100644
--- a/sys/netpfil/ipfilter/netinet/ip_state.c
+++ b/sys/netpfil/ipfilter/netinet/ip_state.c
@@ -5260,7 +5260,7 @@ ipf_state_add_tq(ipf_main_softc_t *softc, int ttl)
 {
 	ipf_state_softc_t *softs = softc->ipf_state_soft;
 
-        return(ipf_addtimeoutqueue(softc, &softs->ipf_state_usertq, ttl));
+	return(ipf_addtimeoutqueue(softc, &softs->ipf_state_usertq, ttl));
 }
 
 
diff --git a/sys/netpfil/ipfilter/netinet/ip_sync.c b/sys/netpfil/ipfilter/netinet/ip_sync.c
index 5fc7cc380088..1d61f4618fb9 100644
--- a/sys/netpfil/ipfilter/netinet/ip_sync.c
+++ b/sys/netpfil/ipfilter/netinet/ip_sync.c
@@ -1234,7 +1234,7 @@ ipf_sync_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd,
 
 	switch (cmd)
 	{
-        case SIOCIPFFL:
+	case SIOCIPFFL:
 		error = BCOPYIN(data, &i, sizeof(i));
 		if (error != 0) {
 			IPFERROR(110023);
diff --git a/sys/netpfil/ipfilter/netinet/ip_tftp_pxy.c b/sys/netpfil/ipfilter/netinet/ip_tftp_pxy.c
index 2ba51f3272af..a6e4b3616e67 100644
--- a/sys/netpfil/ipfilter/netinet/ip_tftp_pxy.c
+++ b/sys/netpfil/ipfilter/netinet/ip_tftp_pxy.c
@@ -9,7 +9,7 @@
 #define IPF_TFTP_PROXY
 
 typedef struct ipf_tftp_softc_s {
-        int     	ipf_p_tftp_readonly;
+	int     	ipf_p_tftp_readonly;
 	ipftuneable_t	*ipf_p_tftp_tune;
 } ipf_tftp_softc_t;