From nobody Mon Feb 07 13:56:01 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6301319B0DB7; Mon, 7 Feb 2022 13:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JsnjZ5BK1z51n1; Mon, 7 Feb 2022 13:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644242163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SDqgC7ob5Ug3anQ1VMp6mmr1fpX78FmfoH9Suy5fFPU=; b=tiWcptf/akj7HObdfY8SGP3+AVNumhQUJH2I3rSNZhwJ+8m9uZ2BDmtROTR1LmheIEXefI mE05XqKPYDTTz5AomeAJjQkvYt47OAHDtd0LP8kTM8VlJP9G3A+LhaS1zu/dWOq/ebz25Z VzYn33pkcgHhuQtCaHjEF/13LCMAhcmIHf2ugJ5zyjGKQ0KyiTX5oz2OxIr7nWUa5KBZpB u9DEYoutrc0OUDWqVgqbDimc5/sdoHuTwGT+Kbs3IlAocE4fO+M375OMx6gozvlOviGXgn 5Mm7UaDFuA8f0upl3BDylnV23xRWnIu0HCA/N0d9aiIDpK3XQaPuEDadpEcrmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9FB826AB5; Mon, 7 Feb 2022 13:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 217Du1a3085347; Mon, 7 Feb 2022 13:56:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 217Du1tF085346; Mon, 7 Feb 2022 13:56:01 GMT (envelope-from git) Date: Mon, 7 Feb 2022 13:56:01 GMT Message-Id: <202202071356.217Du1tF085346@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 83a8f49acf8b - stable/12 - ipfilter module: Fix whitespace errors List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 83a8f49acf8bee7767b2bd5e5339b9bc1ad4f8dd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644242163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SDqgC7ob5Ug3anQ1VMp6mmr1fpX78FmfoH9Suy5fFPU=; b=jsE+KLG2IAa8tjZq9Fu6iVODZ0Rn4zAx6DEGpdJZJiLwmqTGls1GKeN2EA38Dhdl3a8vWu qoOrmX7XbIbl60JnasbDMYWpb/Y7ebfJDg2DFh/29ELHAEFxpipMZFbAXcx2MLnb3AJ3sx P9EZh2QmFmfKJ3lss0rBZrNqFqOky+eXbymCdK6VLorx+zXch7kk/LShvrUVfq0juP/jqr drUBf1zfIiB/rSZvLnQgYe93NZbO+9GuftX0VAo2wRLSxHSPtc8w77ZWu8T8AUwKl1boee DALYj5oMWE0iwkDwHIAWq+HLgv6J431qoKZWDH0qHLCLouApQ6QwydDMizDqgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644242163; a=rsa-sha256; cv=none; b=VbNDRC9U4iN8DiXz0tgzcI/AfP6Psmjvj/b07NoQPWVG4JyuXMLFAJxwMVN914JdAwazdD +7LnZXqoG23J2MIvihnfNW+Ki/dRtGEpZxkXbHxlcGIJh4eg0YN81I4SatSAbrjhK9T5xT 5+J59G7ENUA/3Gogz+UOFS095qYL89ek2v4bdlHKP1QyQShMDrrqVLOgb/cKaJuhP1WdmJ KAyApjHvJ5gX8gHR4W/EkrCTbBHNp8Jkv9sHKqaxOUQj9vk5MVlELjFiV3qZc2bpBM8A28 nzU326F+0qiWD1VaVkGiCzUAthGmZoPZKjrVB9Ztun0r3Xay5fi+0eM73Q1qNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=83a8f49acf8bee7767b2bd5e5339b9bc1ad4f8dd commit 83a8f49acf8bee7767b2bd5e5339b9bc1ad4f8dd Author: Cy Schubert AuthorDate: 2021-12-22 04:53:03 +0000 Commit: Cy Schubert 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;