The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=67cef6d411cef0c3dfcf768ff890b4f97cf513b6

commit 67cef6d411cef0c3dfcf768ff890b4f97cf513b6
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2021-06-15 08:50:32 +0000
Commit:     Kristof Provost <k...@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;
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to