diff mbox

[v3] hostapd: Send an event when an inactive station is removed

Message ID 1320333601-13756-1-git-send-email-cavallar@lri.fr
State Accepted
Commit 6caaae1e48da247b21b54ea6001646597e35d9b1
Headers show

Commit Message

Nicolas Cavallari Nov. 3, 2011, 3:20 p.m. UTC
Currently, there is no events over the control interface
when a AP disconnects a station due to inactivity.  With
this patch, an "AP-STA-DISCONNECTED" event will be sent.

Signed-hostap: Nicolas Cavallari <nicolas.cavallari@lri.fr>
---
 src/ap/sta_info.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Jouni Malinen Nov. 3, 2011, 8 p.m. UTC | #1
On Thu, Nov 03, 2011 at 04:20:01PM +0100, Nicolas Cavallari wrote:
> Currently, there is no events over the control interface
> when a AP disconnects a station due to inactivity.  With
> this patch, an "AP-STA-DISCONNECTED" event will be sent.

Thanks! Applied.
diff mbox

Patch

diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index d82b9ce..184b685 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -17,6 +17,7 @@ 
 #include "utils/common.h"
 #include "utils/eloop.h"
 #include "common/ieee802_11_defs.h"
+#include "common/wpa_ctrl.h"
 #include "radius/radius.h"
 #include "radius/radius_client.h"
 #include "drivers/driver.h"
@@ -375,6 +376,9 @@  void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
 		mlme_deauthenticate_indication(
 			hapd, sta,
 			WLAN_REASON_PREV_AUTH_NOT_VALID);
+
+		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED MACSTR,
+			MAC2STR(sta->addr));
 		ap_free_sta(hapd, sta);
 		break;
 	}