summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2009-01-29 17:19:10 +0000
committerdamien <damien@openbsd.org>2009-01-29 17:19:10 +0000
commit96c2d967865ef77c5c4575108efcd3c4bc505b55 (patch)
tree2f9fdb6f03836fe097d5a9914b6af66cbbae75aa
parentvarious improvements; help/ok mbalmer (diff)
downloadwireguard-openbsd-96c2d967865ef77c5c4575108efcd3c4bc505b55.tar.xz
wireguard-openbsd-96c2d967865ef77c5c4575108efcd3c4bc505b55.zip
fix a panic that occurs when IEEE80211_STA_ONLY is defined (SMALL_KERNEL).
noticed by ray@, more investigation from sthen@ fix tested by sthen@
-rw-r--r--sys/net80211/ieee80211_node.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 741359f6c11..3c7c5ed8d20 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.c,v 1.54 2009/01/28 18:55:18 damien Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.55 2009/01/29 17:19:10 damien Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
@@ -180,11 +180,12 @@ ieee80211_node_detach(struct ifnet *ifp)
ic->ic_bss = NULL;
}
ieee80211_free_allnodes(ic);
+#ifndef IEEE80211_STA_ONLY
if (ic->ic_aid_bitmap != NULL)
free(ic->ic_aid_bitmap, M_DEVBUF);
if (ic->ic_tim_bitmap != NULL)
free(ic->ic_tim_bitmap, M_DEVBUF);
-
+#endif
timeout_del(&ic->ic_rsn_timeout);
}
@@ -1050,8 +1051,8 @@ ieee80211_free_node(struct ieee80211com *ic, struct ieee80211_node *ni)
#ifndef IEEE80211_STA_ONLY
timeout_del(&ni->ni_eapol_to);
timeout_del(&ni->ni_sa_query_to);
-#endif
IEEE80211_AID_CLR(ni->ni_associd, ic->ic_aid_bitmap);
+#endif
RB_REMOVE(ieee80211_tree, &ic->ic_tree, ni);
ic->ic_nnodes--;
#ifndef IEEE80211_STA_ONLY