Hello,

this is yet another occurrence of infamous 'name vs. path mix up' [1].
Leonardo Guardati hit this bug in rule optimizer this time. The patch
below is part of 'the big diff' I've sent while ago [2].

OK?

thanks and
regard
sasha

[1] https://marc.info/?l=openbsd-tech&m=147289981326044&w=2

[2] https://marc.info/?l=openbsd-tech&m=151148479226177&w=2

--------8<---------------8<---------------8<------------------8<--------
# diff fixes pf_opt_create_table() function
diff --git a/sbin/pfctl/pfctl_optimize.c b/sbin/pfctl/pfctl_optimize.c
index a1b19781756..9f3751f480b 100644
--- a/sbin/pfctl/pfctl_optimize.c
+++ b/sbin/pfctl/pfctl_optimize.c
@@ -1307,7 +1307,7 @@ again:
        tablenum++;
 
        if (pfctl_define_table(tbl->pt_name, PFR_TFLAG_CONST | tbl->pt_flags, 1,
-           pf->astack[0]->name, tbl->pt_buf, pf->astack[0]->ruleset.tticket)) {
+           pf->astack[0]->path, tbl->pt_buf, pf->astack[0]->ruleset.tticket)) {
                warn("failed to create table %s in %s",
                    tbl->pt_name, pf->astack[0]->name);
                return (1);

Reply via email to