summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2017-01-09 09:31:18 +0000
committerstsp <stsp@openbsd.org>2017-01-09 09:31:18 +0000
commit7d6afa51d9fda0ff092203f6fa5dc6e4739b309a (patch)
tree24b2fabeff9cff1cb566423155a9ef64785254d8 /sys
parentWhen acting as hostap, negotiate HT before calling the driver's ic_newassoc() (diff)
downloadwireguard-openbsd-7d6afa51d9fda0ff092203f6fa5dc6e4739b309a.tar.xz
wireguard-openbsd-7d6afa51d9fda0ff092203f6fa5dc6e4739b309a.zip
The point of ieee80211_node_leave() is to place the node in COLLECT state.
Return early and do nothing if the node is already in COLLECT state upon entry to this function.
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_node.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 13d6ea0b076..f9c2d55c55c 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.c,v 1.107 2017/01/09 09:30:47 stsp Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.108 2017/01/09 09:31:18 stsp Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
@@ -1680,6 +1680,9 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni)
{
if (ic->ic_opmode != IEEE80211_M_HOSTAP)
panic("not in ap mode, mode %u", ic->ic_opmode);
+
+ if (ni->ni_state == IEEE80211_STA_COLLECT)
+ return;
/*
* If node wasn't previously associated all we need to do is
* reclaim the reference.