diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2008-06-10 20:55:03 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2008-06-10 20:55:03 +0000 |
commit | f50df3d70f76d94947369d017d33e04cb83f6c5c (patch) | |
tree | 4727dee417630479fd80b9771459fba95742573c /sbin/pfctl/parse.y | |
parent | 7b9768b8af911b0c6b25a9d357325da1ba59bb5d (diff) |
Make counters on table addresses optional and disabled by default.
Use the 'counters' table option in pf.conf if you actually need them.
If enabled, memory is not allocated until packets match an address.
This saves about 40% memory if counters are not being used, and paves the way
for some more significant cleanups coming soon.
ok henning mpf deraadt
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r-- | sbin/pfctl/parse.y | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index d3bb2526888..11e60eeddc8 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.547 2008/06/10 04:28:54 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.548 2008/06/10 20:55:02 mcbride Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -1374,6 +1374,8 @@ table_opt : STRING { table_opts.flags |= PFR_TFLAG_CONST; else if (!strcmp($1, "persist")) table_opts.flags |= PFR_TFLAG_PERSIST; + else if (!strcmp($1, "counters")) + table_opts.flags |= PFR_TFLAG_COUNTERS; else { yyerror("invalid table option '%s'", $1); free($1); |