From nobody Tue Dec 17 10:08:01 2024 X-Original-To: dev-commits-src-main@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 4YCCDd5Mzgz5h0qm; Tue, 17 Dec 2024 10:08:01 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YCCDd2nLwz49pl; Tue, 17 Dec 2024 10:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734430081; 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=x2N2cAtJdF1MrQz8EjD0uZHEwxslcOf6iCVTSDv4XcA=; b=ZpA0BRFEHALukvKtynIe5HTwww9nlG4fo5BThiK1IdgW8HgipDY+eZzYVE8XqEWDUYmYof tOcffiMg2jtI8+zOHUKM/EKi4ZXcW8ZGdnoS5mhDM1i/T1+UG3XYeaHiYBBkG3Mogmdyi/ jt9/GtNkgBYUUmVwl04RdhDxlK7u26BaKaYl3pbZ8OzQ4pWI3M4EbOnhvDQCPU7lqrK1sX Fk6hPgju42E9N1D3V9xZHG/YlJlA+UWOIgOMdd99l6G3fbmppdkS2mIoVr1NplPkw6o80/ 8nNofEtU914RpiqMkVwUe/HaaEjuHXNrPUEaHoYWofPsGPP07Cou1ndJNg736g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734430081; 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=x2N2cAtJdF1MrQz8EjD0uZHEwxslcOf6iCVTSDv4XcA=; b=ldKbjE7EIkBYbwyL8F+AuSRfRCiqmRc9zvTvzv61Yx59/TQIglxefcp2hSZn2qiub9SI44 GamhD0xiDly2S5iVYVWm2px6QrDxZhFH6jJXgbVnER0k9M6gvzbg3xwkrFLVU0d3s0pSng +fS/l7mT9X5KblFRDBuewRlubTqmBVgBKkuOLUxMI7N/JBd23j1v16CFG2AFCszRKpkUps n5a+AOWZ2CxR4sUzZngf4eyzbZLXJaBrbyeBWqog+mWPXyMl7P1k4HLYnBcB9W3f+DtMYy p8JC8WwOVFfqELFbjBjgaKJMi2puxncY1ZpRzfhFYFeO+gVcR7BJvZ+9GcJr5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734430081; a=rsa-sha256; cv=none; b=vU0K96b6zr3L8GcdgPfV8MvceV2En97yUSDEOWKrvEVmVqU272KIkFH5CXFpx0oCF4qS8h 7D6hBWJCWMmB+1wLCilcJrz5iHcIBGeeGme0otOVLWdBk1ztb3v3D1fj7qJCSkUb5kOJ40 EsTkNmZUuDfWm2NWUZP5uLDfWbPsQwFwNL8ZQ2lZAjadpX9hJ/MPZ86ubKfYeMIXxz70rx 2BNTCOHoVv1+FMPsPZjqrhE8quql0Etu5B/JljFkzc5Bs/RsZ+u9aYrfbLLsq9tKq/rJ2W Pn7qb9LrM/ZJXMpRrEbW1k2fLR5Q1UtPoblWFRwEH3uJIDQksI/G14po7k7Uyg== 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 4YCCDd1l0KzJS2; Tue, 17 Dec 2024 10:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BHA81An024281; Tue, 17 Dec 2024 10:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BHA81l4024278; Tue, 17 Dec 2024 10:08:01 GMT (envelope-from git) Date: Tue, 17 Dec 2024 10:08:01 GMT Message-Id: <202412171008.4BHA81l4024278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d7e9df4fc67f - main - pfctl: print_rule: rename opts -> ropts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7e9df4fc67f2ffaeafe0f130d67eb0f112a0858 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d7e9df4fc67f2ffaeafe0f130d67eb0f112a0858 commit d7e9df4fc67f2ffaeafe0f130d67eb0f112a0858 Author: Kristof Provost AuthorDate: 2024-11-12 10:58:51 +0000 Commit: Kristof Provost CommitDate: 2024-12-17 10:07:15 +0000 pfctl: print_rule: rename opts -> ropts no binary change 1/2 from Lawrence Teo ok sthen dlg myself and gcc Obtained from: OpenBSD, henning , 6992ade79a Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47800 --- sbin/pfctl/pfctl_parser.c | 66 +++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 7cbca9a75af2..741915d41b0d 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -837,7 +837,7 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer static const char *anchortypes[] = { "anchor", "anchor", "anchor", "anchor", "nat-anchor", "nat-anchor", "binat-anchor", "binat-anchor", "rdr-anchor", "rdr-anchor" }; - int i, opts; + int i, ropts; char *p; if (verbose) @@ -1044,72 +1044,72 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer } printf(" probability %s%%", buf); } - opts = 0; + ropts = 0; if (r->max_states || r->max_src_nodes || r->max_src_states) - opts = 1; + ropts = 1; if (r->rule_flag & PFRULE_NOSYNC) - opts = 1; + ropts = 1; if (r->rule_flag & PFRULE_SRCTRACK) - opts = 1; + ropts = 1; if (r->rule_flag & PFRULE_IFBOUND) - opts = 1; + ropts = 1; if (r->rule_flag & PFRULE_STATESLOPPY) - opts = 1; + ropts = 1; if (r->rule_flag & PFRULE_PFLOW) - opts = 1; - for (i = 0; !opts && i < PFTM_MAX; ++i) + ropts = 1; + for (i = 0; !ropts && i < PFTM_MAX; ++i) if (r->timeout[i]) - opts = 1; - if (opts) { + ropts = 1; + if (ropts) { printf(" ("); if (r->max_states) { printf("max %u", r->max_states); - opts = 0; + ropts = 0; } if (r->rule_flag & PFRULE_NOSYNC) { - if (!opts) + if (!ropts) printf(", "); printf("no-sync"); - opts = 0; + ropts = 0; } if (r->rule_flag & PFRULE_SRCTRACK) { - if (!opts) + if (!ropts) printf(", "); printf("source-track"); if (r->rule_flag & PFRULE_RULESRCTRACK) printf(" rule"); else printf(" global"); - opts = 0; + ropts = 0; } if (r->max_src_states) { - if (!opts) + if (!ropts) printf(", "); printf("max-src-states %u", r->max_src_states); - opts = 0; + ropts = 0; } if (r->max_src_conn) { - if (!opts) + if (!ropts) printf(", "); printf("max-src-conn %u", r->max_src_conn); - opts = 0; + ropts = 0; } if (r->max_src_conn_rate.limit) { - if (!opts) + if (!ropts) printf(", "); printf("max-src-conn-rate %u/%u", r->max_src_conn_rate.limit, r->max_src_conn_rate.seconds); - opts = 0; + ropts = 0; } if (r->max_src_nodes) { - if (!opts) + if (!ropts) printf(", "); printf("max-src-nodes %u", r->max_src_nodes); - opts = 0; + ropts = 0; } if (r->overload_tblname[0]) { - if (!opts) + if (!ropts) printf(", "); printf("overload <%s>", r->overload_tblname); if (r->flush) @@ -1118,30 +1118,30 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer printf(" global"); } if (r->rule_flag & PFRULE_IFBOUND) { - if (!opts) + if (!ropts) printf(", "); printf("if-bound"); - opts = 0; + ropts = 0; } if (r->rule_flag & PFRULE_STATESLOPPY) { - if (!opts) + if (!ropts) printf(", "); printf("sloppy"); - opts = 0; + ropts = 0; } if (r->rule_flag & PFRULE_PFLOW) { - if (!opts) + if (!ropts) printf(", "); printf("pflow"); - opts = 0; + ropts = 0; } for (i = 0; i < PFTM_MAX; ++i) if (r->timeout[i]) { int j; - if (!opts) + if (!ropts) printf(", "); - opts = 0; + ropts = 0; for (j = 0; pf_timeouts[j].name != NULL; ++j) if (pf_timeouts[j].timeout == i)