From ed5b2b7844c7e78f6e26ba51a83a885510596fdd Mon Sep 17 00:00:00 2001 From: Ryan Thomas McBride Date: Sat, 3 Dec 2011 12:44:57 +0000 Subject: Avoid loading garbage hostid and other values not always initialised, by bzero()ing the 'struct pfsync' properly. ok dlg mpf --- sbin/pfctl/pfctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3