From cb3bb3cecc1d0474c3e63d1cdf36ba8c39fdf873 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Tue, 10 Jun 2008 20:14:03 +0000 Subject: when walking the entire state table it makes much more sense to walk the tailq instead of the rb tree. pt out by kjell some time ago, ok ryan --- sys/net/pf_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/net') diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index a2614d615ae..8e803a5e8b6 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.202 2008/06/10 19:32:13 henning Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.203 2008/06/10 20:14:02 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1569,8 +1569,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 = RB_MIN(pf_state_tree_id, &tree_id); s; s = nexts) { - nexts = RB_NEXT(pf_state_tree_id, &tree_id, s); + for (s = TAILQ_FIRST(&state_list); s; s = nexts) { + nexts = TAILQ_NEXT(s, entry_list); if (!psk->psk_ifname[0] || !strcmp(psk->psk_ifname, s->kif->pfik_name)) { -- cgit v1.2.3