diff options
author | 2003-06-10 22:05:03 +0000 | |
---|---|---|
committer | 2003-06-10 22:05:03 +0000 | |
commit | 2dbe3ddbb487e642ad921a272175e064435e85a7 (patch) | |
tree | 8715b62b0822af7d67c3497a34b2ec3a8b532fb6 | |
parent | Remove an extraneous "& 0xff" (the cast to unsigned char is sufficient). (diff) | |
download | wireguard-openbsd-2dbe3ddbb487e642ad921a272175e064435e85a7.tar.xz wireguard-openbsd-2dbe3ddbb487e642ad921a272175e064435e85a7.zip |
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.
-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; |