summaryrefslogtreecommitdiff
path: root/sbin/pfctl/pfctl_parser.c
diff options
context:
space:
mode:
authorMike Frantzen <frantzen@cvs.openbsd.org>2004-07-16 23:44:26 +0000
committerMike Frantzen <frantzen@cvs.openbsd.org>2004-07-16 23:44:26 +0000
commit5ceed480a44c2b160b436af9c826a7d3afc3451d (patch)
treef0b7c0b03995eb93bcf94ee4531c08e5922ba0a9 /sbin/pfctl/pfctl_parser.c
parent2bb5df01d2905b54f0ce53cafbc466d008f58829 (diff)
'pfctl -o' ruleset optimizer that doesnt change the meaning of the final ruleset
- remove identical and subsetted rules - when advantageous merge rules w/ similar addresses into a table and one rule - re-order rules to improve skip step performance (can do better w/ kernel mods) - 'pfctl -oo' will load the currently running ruleset and use it as a profile to direct the optimization of quicked rules ok henning@ mcbride@. man page help from jmc@
Diffstat (limited to 'sbin/pfctl/pfctl_parser.c')
-rw-r--r--sbin/pfctl/pfctl_parser.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c
index 0d0aaf54278..e83ae9eab95 100644
--- a/sbin/pfctl/pfctl_parser.c
+++ b/sbin/pfctl/pfctl_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_parser.c,v 1.202 2004/06/29 22:14:13 henning Exp $ */
+/* $OpenBSD: pfctl_parser.c,v 1.203 2004/07/16 23:44:25 frantzen Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -966,9 +966,7 @@ set_ipmask(struct node_host *h, u_int8_t b)
int i, j = 0;
m = &h->addr.v.a.mask;
-
- for (i = 0; i < 4; i++)
- m->addr32[i] = 0;
+ memset(m, 0, sizeof(*m));
while (b >= 32) {
m->addr32[j++] = 0xffffffff;