diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2011-12-03 12:44:57 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2011-12-03 12:44:57 +0000 |
commit | ed5b2b7844c7e78f6e26ba51a83a885510596fdd (patch) | |
tree | 79a9cead3824c2cf65b3fd3414d2147d71f6da38 | |
parent | 9a9f7b700815cedc986e4ae9e93394dc95c8e70a (diff) |
Avoid loading garbage hostid and other values not always initialised,
by bzero()ing the 'struct pfsync' properly.
ok dlg mpf
-rw-r--r-- | sbin/pfctl/pfctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 2bc336c7374..1794d5a3b97 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.306 2011/11/23 10:24:37 henning Exp $ */ +/* $OpenBSD: pfctl.c,v 1.307 2011/12/03 12:44:56 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1273,6 +1273,7 @@ pfctl_rules(int dev, char *filename, int opts, int optimize, char *path = NULL; int osize; + bzero(&pf, sizeof(pf)); RB_INIT(&pf_anchors); memset(&pf_main_anchor, 0, sizeof(pf_main_anchor)); pf_init_ruleset(&pf_main_anchor.ruleset); |