summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2005-02-15 21:31:22 +0000
committeraaron <aaron@openbsd.org>2005-02-15 21:31:22 +0000
commitfc1ccb1b76588f654ed7fa67bd956b593e50f01c (patch)
treeb878288d4db1e8622e84fb228b707f4f9494c796 /sys/net
parentFix HPUX fcntl() F_GETLK compatibility. Broken since r1.10 by FREF/FRELE (diff)
downloadwireguard-openbsd-fc1ccb1b76588f654ed7fa67bd956b593e50f01c.tar.xz
wireguard-openbsd-fc1ccb1b76588f654ed7fa67bd956b593e50f01c.zip
Fix scoping error which could cause some states with an empty ifname to be
purged errneously. mpf@ ok
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_pfsync.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 9b28f316754..2ef3fbfbd9e 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.44 2005/01/20 17:54:26 mcbride Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.45 2005/02/15 21:31:22 aaron Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -321,9 +321,10 @@ pfsync_input(struct mbuf *m, ...)
s = splsoftnet();
if (cp->ifname[0] == '\0') {
RB_FOREACH(st, pf_state_tree_id, &tree_id) {
- if (st->creatorid == creatorid)
+ if (st->creatorid == creatorid) {
st->timeout = PFTM_PURGE;
pf_purge_expired_state(st);
+ }
}
} else {
kif = pfi_lookup_if(cp->ifname);