diff options
author | 2008-06-22 13:01:33 +0000 | |
---|---|---|
committer | 2008-06-22 13:01:33 +0000 | |
commit | 494e39eeb936326608c80dc2752198cf2a17162e (patch) | |
tree | 6085f9c3e6516c9821b76345f96aed2a829be61b /sys/net/pf_ioctl.c | |
parent | print vendor and product in hexa on debug. (diff) | |
download | wireguard-openbsd-494e39eeb936326608c80dc2752198cf2a17162e.tar.xz wireguard-openbsd-494e39eeb936326608c80dc2752198cf2a17162e.zip |
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)) { |