git: 80030b6cc734 - main - ipfilter module: Fix whitespace errors

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Tue, 04 Jan 2022 02:07:45 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=80030b6cc734cc50c20d87de99bb631a06888f37

commit 80030b6cc734cc50c20d87de99bb631a06888f37
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-12-22 04:53:03 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-01-04 02:06:44 +0000

    ipfilter module: Fix whitespace errors
    
    Replace leading spaces with a tabs on affected lines.
    
    MFC after:      1 month
---
 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 +-
 sys/netpfil/ipfilter/netinet/mlfk_ipl.c       | 16 +++----
 13 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c
index f5c15b8724d1..3b135ebf1d3d 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 f4bb9c32590e..ffd573e8417e 100644
--- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
+++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
@@ -174,7 +174,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) {
@@ -274,7 +274,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 ceff221d2a56..74db35f670f0 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 3c81e51609b0..171902e8dc63 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;
 
diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c
index 4a1e29c9b7bd..610280b6bef4 100644
--- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c
+++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c
@@ -89,23 +89,23 @@ static	int	ipfwrite(dev_t, struct uio *, int);
 SYSCTL_DECL(_net_inet);
 #define SYSCTL_IPF(parent, nbr, name, access, ptr, val, descr) \
     SYSCTL_OID(parent, nbr, name, \
-        CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
-        ptr, val, sysctl_ipf_int, "I", descr)
+	CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
+	ptr, val, sysctl_ipf_int, "I", descr)
 #define SYSCTL_DYN_IPF_NAT(parent, nbr, name, access,ptr, val, descr) \
     SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
-        CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE |access, \
-        ptr, val, sysctl_ipf_int_nat, "I", descr)
+	CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE |access, \
+	ptr, val, sysctl_ipf_int_nat, "I", descr)
 #define SYSCTL_DYN_IPF_STATE(parent, nbr, name, access,ptr, val, descr) \
     SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
-        CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
-        ptr, val, sysctl_ipf_int_state, "I", descr)
+	CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
+	ptr, val, sysctl_ipf_int_state, "I", descr)
 #define SYSCTL_DYN_IPF_FRAG(parent, nbr, name, access,ptr, val, descr) \
     SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
-        CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
+	CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
 	ptr, val, sysctl_ipf_int_frag, "I", descr)
 #define SYSCTL_DYN_IPF_AUTH(parent, nbr, name, access,ptr, val, descr) \
     SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
-        CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
+	CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
 	ptr, val, sysctl_ipf_int_auth, "I", descr)
 static struct sysctl_ctx_list ipf_clist;
 #define	CTLFLAG_OFF	0x00800000	/* IPFilter must be disabled */