diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-06-10 22:05:04 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2003-06-10 22:05:04 +0000 |
commit | f18f6607440f6d2da08fac3522d88a65c77a5f3e (patch) | |
tree | e558c5d96bd0eeace52b0a1f493e1ddf105cab10 /sys | |
parent | b4cd6c88c290fe4a637a73ad799de32e071d60b1 (diff) |
It would kind of help if the flags member was initialized, otherwise random
rules create state. Truly hard to spot. Unless you run the code, of course.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index f17d8694cfd..588410007e0 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.362 2003/06/09 11:14:46 mcbride Exp $ */ +/* $OpenBSD: pf.c,v 1.363 2003/06/10 22:05:03 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -4676,6 +4676,7 @@ pf_test(int dir, struct ifnet *ifp, struct mbuf **m0) goto done; } + memset(&pd, 0, sizeof(pd)); pd.src = (struct pf_addr *)&h->ip_src; pd.dst = (struct pf_addr *)&h->ip_dst; pd.ip_sum = &h->ip_sum; @@ -4885,6 +4886,7 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0) m = *m0; h = mtod(m, struct ip6_hdr *); + memset(&pd, 0, sizeof(pd)); pd.src = (struct pf_addr *)&h->ip6_src; pd.dst = (struct pf_addr *)&h->ip6_dst; pd.ip_sum = NULL; |