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.
This commit is contained in:
Kristof Provost 2024-05-26 23:06:12 +02:00
parent 0e03402139
commit 76bc4a776f

View File

@ -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: