From 76bc4a776facc73905eff5f70d52785de2100cac Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Sun, 26 May 2024 23:06:12 +0200 Subject: [PATCH] pfctl: use pfctl_add_rule_h() rather than pfctl_add_rule() This ensures we use the handle opened with pfctl_open(), and also brings us closer to the ideal state where everything uses the handle rather than a file descriptor. --- sbin/pfctl/pfctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 19d05c415f02..1843ec5713d6 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2035,7 +2035,7 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth) if ((pf->opts & PF_OPT_NOACTION) == 0) { if (pfctl_add_pool(pf, &r->rpool, r->af)) return (1); - error = pfctl_add_rule(pf->dev, r, anchor, name, ticket, + error = pfctl_add_rule_h(pf->h, r, anchor, name, ticket, pf->paddr.ticket); switch (error) { case 0: