Date: Tue, 24 Jan 2023 08:36:46 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: cd80c52cade3 - main - pfctl: rule.label is a two-dimensional array Message-ID: <202301240836.30O8akxQ007280@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cd80c52cade3e38d273eecec6f9b0a7cba23bcc8 commit cd80c52cade3e38d273eecec6f9b0a7cba23bcc8 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-01-24 06:46:46 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-01-24 06:46:46 +0000 pfctl: rule.label is a two-dimensional array Fix checking for a non-empty first string. PR: 269075 MFC after: 1 week Reported by: nreilly@blackberry.com --- sbin/pfctl/pfctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 37c9625492b1..f60e3f67e082 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1309,7 +1309,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, case PFCTL_SHOW_LABELS: break; case PFCTL_SHOW_RULES: - if (rule.label[0] && (opts & PF_OPT_SHOWALL)) + if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; print_rule(&rule, anchor_call, rule_numbers, numeric); printf("\n"); @@ -1363,7 +1363,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, break; } case PFCTL_SHOW_RULES: - if (rule.label[0] && (opts & PF_OPT_SHOWALL)) + if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; INDENT(depth, !(opts & PF_OPT_VERBOSE)); print_rule(&rule, anchor_call, rule_numbers, numeric);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301240836.30O8akxQ007280>