From patchwork Thu Nov 3 15:20:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 123454 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 7F5D1B6F72 for ; Fri, 4 Nov 2011 02:21:24 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A3A169D27A; Thu, 3 Nov 2011 11:21:21 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jsk53KfTZ90J; Thu, 3 Nov 2011 11:21:21 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 8DEBA9C207; Thu, 3 Nov 2011 11:21:16 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B8F119D236 for ; Thu, 3 Nov 2011 11:21:14 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VPNKpkbskSsJ for ; Thu, 3 Nov 2011 11:21:09 -0400 (EDT) Received: from smtp1.u-psud.fr (smtp1.u-psud.fr [129.175.33.41]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B76289C207 for ; Thu, 3 Nov 2011 11:21:09 -0400 (EDT) Received: from smtp1.u-psud.fr (localhost [127.0.0.1]) by localhost (MTA) with SMTP id CC768253660 for ; Thu, 3 Nov 2011 16:21:08 +0100 (CET) Received: from ext.lri.fr (ext.lri.fr [129.175.15.4]) by smtp1.u-psud.fr (MTA) with ESMTP id 4E5C5255E03 for ; Thu, 3 Nov 2011 16:21:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ext.lri.fr (Postfix) with ESMTP id 46E8A407CE for ; Thu, 3 Nov 2011 16:21:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lri.fr Received: from ext.lri.fr ([127.0.0.1]) by localhost (ext.lri.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SoO9tW0N1S0K for ; Thu, 3 Nov 2011 16:21:08 +0100 (CET) Received: from smtp-ng.lri.fr (smtp [129.175.3.73]) by ext.lri.fr (Postfix) with ESMTP id 26393407B1 for ; Thu, 3 Nov 2011 16:21:08 +0100 (CET) Received: from lowerbit.lri.fr (lri25-36 [129.175.25.36]) by smtp-ng.lri.fr (Postfix) with ESMTP id 20BC6607B3; Thu, 3 Nov 2011 16:21:08 +0100 (CET) From: Nicolas Cavallari To: hostap@lists.shmoo.com Subject: [PATCH v3] hostapd: Send an event when an inactive station is removed Date: Thu, 3 Nov 2011 16:20:01 +0100 Message-Id: <1320333601-13756-1-git-send-email-cavallar@lri.fr> X-Mailer: git-send-email 1.7.7.1 In-Reply-To: <1320055414-27754-1-git-send-email-cavallar@lri.fr> References: <1320055414-27754-1-git-send-email-cavallar@lri.fr> Cc: Nicolas Cavallari X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com 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 --- src/ap/sta_info.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) 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; }