aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2024-11-12 10:58:51 +0000
committerKristof Provost <kp@FreeBSD.org>2024-12-17 10:07:15 +0000
commitd7e9df4fc67f2ffaeafe0f130d67eb0f112a0858 (patch)
tree6e415e1c455225aba372b035ec494a128dc50c4e
parentf1ddd7f1dae6fa3cab8c5044e3b4f719bf93ec97 (diff)
pfctl: print_rule: rename opts -> ropts
no binary change 1/2 from Lawrence Teo <lteo at devio dot us> ok sthen dlg myself and gcc Obtained from: OpenBSD, henning <henning@openbsd.org>, 6992ade79a Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47800
-rw-r--r--sbin/pfctl/pfctl_parser.c66
1 files 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)