From patchwork Fri Sep 14 13:12:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 183920 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]) by ozlabs.org (Postfix) with ESMTP id E18482C0089 for ; Fri, 14 Sep 2012 23:13:31 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A170817C025; Fri, 14 Sep 2012 09:13:10 -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 Wwz1l-Eq6LL8; Fri, 14 Sep 2012 09:13:10 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 220C017C029; Fri, 14 Sep 2012 09:12:45 -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 D424017C00F for ; Fri, 14 Sep 2012 09:12:42 -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 DpxQXEbORyqr for ; Fri, 14 Sep 2012 09:12:39 -0400 (EDT) Received: from nbd.name (nbd.name [46.4.11.11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 1D59A9D1F2 for ; Fri, 14 Sep 2012 09:12:33 -0400 (EDT) Received: by nf.local (Postfix, from userid 501) id 1A02F7BB967; Fri, 14 Sep 2012 15:12:29 +0200 (CEST) From: Felix Fietkau To: hostap@lists.shmoo.com Subject: [PATCH 4/5] hostap: add check for the wds sta flag before creating 4addr VLANs Date: Fri, 14 Sep 2012 15:12:28 +0200 Message-Id: <1347628349-34362-4-git-send-email-nbd@openwrt.org> X-Mailer: git-send-email 1.7.9.6 (Apple Git-31.1) In-Reply-To: <1347628349-34362-3-git-send-email-nbd@openwrt.org> References: <1347628349-34362-1-git-send-email-nbd@openwrt.org> <1347628349-34362-2-git-send-email-nbd@openwrt.org> <1347628349-34362-3-git-send-email-nbd@openwrt.org> 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 Signed-hostap: Felix Fietkau --- src/ap/ieee802_11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 4b6e9d7..ce20e5f 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -1831,6 +1831,9 @@ void ieee802_11_rx_from_unknown(struct hostapd_data *hapd, const u8 *src, sta = ap_get_sta(hapd, src); if (sta && (sta->flags & WLAN_STA_ASSOC)) { + if (!hapd->conf->wds_sta) + return; + if (wds && !(sta->flags & WLAN_STA_WDS)) { wpa_printf(MSG_DEBUG, "Enable 4-address WDS mode for " "STA " MACSTR " (aid %u)",