summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2011-03-28 14:49:40 +0000
committerkettenis <kettenis@openbsd.org>2011-03-28 14:49:40 +0000
commit16edf31715caebd6e1c62fa114c2b24dbd2ae69a (patch)
tree0a92cba5b934b9e3f5cf8b098ec89a548464d50d /sys/net80211/ieee80211_node.c
parenttweak previous; (diff)
downloadwireguard-openbsd-16edf31715caebd6e1c62fa114c2b24dbd2ae69a.tar.xz
wireguard-openbsd-16edf31715caebd6e1c62fa114c2b24dbd2ae69a.zip
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@
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-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;