diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2008-06-22 13:01:34 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2008-06-22 13:01:34 +0000 |
commit | 370e64b204cff13dd0ee2be7bfea51578a7ecb59 (patch) | |
tree | baa04ddb3670cc037324dcb80fa79d246ffb1ecb /sys/net/pf_ioctl.c | |
parent | 5ec0538ef4822446c489c842acfd83f7befc362f (diff) |
Revert 1.203; it's not safe to blindly walk the tailq instead of the rbtree
for picking states to unlink as the tailq may contain unlinked states.
Diffstat (limited to 'sys/net/pf_ioctl.c')
-rw-r--r-- | sys/net/pf_ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 5fb5706cb10..733ce7ffde7 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.207 2008/06/14 19:09:52 jsing Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.208 2008/06/22 13:01:33 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1580,8 +1580,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) struct pfioc_state_kill *psk = (struct pfioc_state_kill *)addr; u_int killed = 0; - for (s = TAILQ_FIRST(&state_list); s; s = nexts) { - nexts = TAILQ_NEXT(s, entry_list); + for (s = RB_MIN(pf_state_tree_id, &tree_id); s; s = nexts) { + nexts = RB_NEXT(pf_state_tree_id, &tree_id, s); if (!psk->psk_ifname[0] || !strcmp(psk->psk_ifname, s->kif->pfik_name)) { |