Date: Thu, 17 Jun 2021 09:18:12 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: 67cef6d411ce - main - bsnmp: Fix incorrect use of libpfctl Message-ID: <202106170918.15H9ICMY054545@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=67cef6d411cef0c3dfcf768ff890b4f97cf513b6 commit 67cef6d411cef0c3dfcf768ff890b4f97cf513b6 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-06-15 08:50:32 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-06-17 08:53:40 +0000 bsnmp: Fix incorrect use of libpfctl When we introduced libpfctl in bnsmpd this was done incorrectly, and a GETRULE call was replaced by pfctl_add_rule(). Change it to pfctl_get_rule(). Reviewed by: donner MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") --- usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c index 51d940f20c99..4ef35ac1eec2 100644 --- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c +++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c @@ -1530,8 +1530,8 @@ pfl_scan_ruleset(const char *path) for (nr = pr.nr, i = 0; i < nr; i++) { pr.nr = i; - if (pfctl_add_rule(dev, &rule, pr.anchor, pr.anchor_call, - pr.ticket, pr.pool_ticket)) { + if (pfctl_get_rule(dev, pr.nr, pr.ticket, pr.anchor, + PF_PASS, &rule, pr.anchor_call)) { syslog(LOG_ERR, "pfl_scan_ruleset: ioctl(DIOCGETRULE):" " %s", strerror(errno)); goto err;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106170918.15H9ICMY054545>