summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-03-28 14:49:41 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-03-28 14:49:41 +0000
commitc4115a3de02450014f9d572bae0cffcbfc27e4ba (patch)
tree30f2a004110e2041d761719557f3616f90646c42
parent568a3c34a82ce1e5752d1c349752ccc77fdd787f (diff)
Clean nodes until the number of cached nodes is smaller than the maximum number
of nodes, otherwise we'll never actually clean any nodes. Fixes issues with clients failing too attach because the node cache is completely filled. ok damien@
-rw-r--r--sys/net80211/ieee80211_node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 2e15718127a..893de460bfd 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.c,v 1.62 2010/08/07 03:50:02 krw Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.63 2011/03/28 14:49:40 kettenis Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
@@ -1118,7 +1118,7 @@ ieee80211_clean_nodes(struct ieee80211com *ic)
for (ni = RB_MIN(ieee80211_tree, &ic->ic_tree);
ni != NULL; ni = next_ni) {
next_ni = RB_NEXT(ieee80211_tree, &ic->ic_tree, ni);
- if (ic->ic_nnodes <= ic->ic_max_nnodes)
+ if (ic->ic_nnodes < ic->ic_max_nnodes)
break;
if (ni->ni_scangen == gen) /* previously handled */
continue;