From patchwork Mon Oct 31 10:03:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 122771 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 4E271B6F76 for ; Mon, 31 Oct 2011 21:03:52 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 648819C192; Mon, 31 Oct 2011 06:03:49 -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 aTFyWeUgKZUT; Mon, 31 Oct 2011 06:03:49 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 5FB369C160; Mon, 31 Oct 2011 06:03:44 -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 5EE819C160 for ; Mon, 31 Oct 2011 06:03:43 -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 Igf0tNujJC7P for ; Mon, 31 Oct 2011 06:03:39 -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 D03FF9C15B for ; Mon, 31 Oct 2011 06:03:39 -0400 (EDT) Received: from smtp1.u-psud.fr (localhost [127.0.0.1]) by localhost (MTA) with SMTP id 67BA725084E for ; Mon, 31 Oct 2011 11:03:39 +0100 (CET) Received: from ext.lri.fr (ext.lri.fr [129.175.15.4]) by smtp1.u-psud.fr (MTA) with ESMTP id 4F886250833 for ; Mon, 31 Oct 2011 11:03:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by ext.lri.fr (Postfix) with ESMTP id 4BF73401FE for ; Mon, 31 Oct 2011 11:03:39 +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 5F4YhDZrF-v7 for ; Mon, 31 Oct 2011 11:03:39 +0100 (CET) Received: from smtp-ng.lri.fr (smtp [129.175.3.73]) by ext.lri.fr (Postfix) with ESMTP id 2EC44400A6 for ; Mon, 31 Oct 2011 11:03:39 +0100 (CET) Received: from lowerbit.lri.fr (lri25-36 [129.175.25.36]) by smtp-ng.lri.fr (Postfix) with ESMTP id 25C706077D; Mon, 31 Oct 2011 11:03:39 +0100 (CET) From: Nicolas Cavallari To: hostap@lists.shmoo.com Subject: [PATCH] ctrl_iface: Send an event when an inactive station is removed Date: Mon, 31 Oct 2011 11:03:34 +0100 Message-Id: <1320055414-27754-1-git-send-email-cavallar@lri.fr> X-Mailer: git-send-email 1.7.7.1 In-Reply-To: <4EAE7096.8050407@lri.fr> References: <4EAE7096.8050407@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 station is removed due to inactivity. With this patch, an "AP-STA-DISCONNECTED" event is sent when a station is removed. 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..28e6a32 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; }