diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2008-01-26 13:16:37 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2008-01-26 13:16:37 +0000 |
commit | 6dd9b927308aaacf430781c8fc0f5d4fee39c175 (patch) | |
tree | 0fd6798fe23de154824b78b93f32612eb7d05ee9 /sbin | |
parent | 2f64695cdefc2b134b7ca6233bc27835f2059b8d (diff) |
Create the automatic tables at the base of the anchor stack rather than
in the inline anchor. Fixes optimizer bug where automatic table creation in
inline anchors fails because rules are now loaded after optimization
and no transaction has been opened for the anchor.
bug reported by Henrik Johansen
ok henning dhartmei
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl_optimize.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl_optimize.c b/sbin/pfctl/pfctl_optimize.c index 157b8302bc4..8a80232cc5b 100644 --- a/sbin/pfctl/pfctl_optimize.c +++ b/sbin/pfctl/pfctl_optimize.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_optimize.c,v 1.15 2008/01/25 07:27:24 mcbride Exp $ */ +/* $OpenBSD: pfctl_optimize.c,v 1.16 2008/01/26 13:16:36 mcbride Exp $ */ /* * Copyright (c) 2004 Mike Frantzen <frantzen@openbsd.org> @@ -1313,8 +1313,9 @@ again: if (pfctl_define_table(tbl->pt_name, PFR_TFLAG_CONST, 1, - pf->anchor->name, tbl->pt_buf, pf->anchor->ruleset.tticket)) { - warn("failed to create table %s", tbl->pt_name); + pf->astack[0]->name, 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); } return (0); |