From patchwork Fri May 17 17:22:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: michael-dev X-Patchwork-Id: 249372 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 2DEF92C0096 for ; Thu, 6 Jun 2013 20:14:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 210BF9C13A; Thu, 6 Jun 2013 06:12:50 -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 3n8CMNJFkOHv; Thu, 6 Jun 2013 06:12:49 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 8145F9C220; Thu, 6 Jun 2013 06:09:49 -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 F20FC9C220 for ; Thu, 6 Jun 2013 06:09:48 -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 6-Y1VqbbxtR4 for ; Thu, 6 Jun 2013 06:09:43 -0400 (EDT) Received: from mail.fem.tu-ilmenau.de (mail.fem.tu-ilmenau.de [141.24.101.79]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 3F6129C13A for ; Thu, 6 Jun 2013 06:09:11 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.fem.tu-ilmenau.de (Postfix) with ESMTP id C37E8653C for ; Thu, 6 Jun 2013 12:09:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at fem.tu-ilmenau.de Received: from mail.fem.tu-ilmenau.de ([127.0.0.1]) by localhost (mail.fem.tu-ilmenau.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4T8YJduHkPpn; Thu, 6 Jun 2013 12:09:10 +0200 (CEST) Received: from a234.fem.tu-ilmenau.de (unknown [10.42.51.234]) by mail.fem.tu-ilmenau.de (Postfix) with ESMTP; Thu, 6 Jun 2013 12:09:08 +0200 (CEST) Received: by a234.fem.tu-ilmenau.de (Postfix, from userid 0) id 4BD1A20A677; Thu, 6 Jun 2013 12:09:07 +0200 (CEST) Message-Id: <7bc70e3c69c1ad3b0c780aed8ef096284b902e48.1370512966.git.michael-dev@fami-braun.de> In-Reply-To: References: From: Michael Braun Date: Fri, 17 May 2013 19:22:39 +0200 Subject: [PATCHv2 17/21] VLAN: reduce newlink/dellink message printing To: hostap@lists.shmoo.com MIME-Version: 1.0 Cc: projekt-wlan@fem.tu-ilmenau.de X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list Reply-To: projekt-wlan@fem.tu-ilmenau.de List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com NEWLINK and DELLINK messages are received once per BSS (due to that many sockets), so each BSS will print a NEWLINK/DELLINK message. This makes output clumsy if there are many BSS, so this patch hides the message for all unaffected BSS. Signed-hostap: Michael Braun diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c index 982e793..36e74e1 100644 --- a/src/ap/vlan_init.c +++ b/src/ap/vlan_init.c @@ -655,12 +655,12 @@ static void vlan_newlink(char *ifname, struct hostapd_data *hapd) char vlan_ifname[IFNAMSIZ+1]; int i, ret; - wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname); - for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) { if (os_strcmp(ifname, vlan->ifname) != 0 || vlan->newlink_seen) continue; + wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname); + int untagged, num_tagged, *tagged; num_tagged = vlan_tagged(&vlan->vlan_id, &tagged); untagged = vlan_untagged(&vlan->vlan_id); @@ -759,13 +759,14 @@ static void vlan_dellink(char *ifname, struct hostapd_data *hapd) char vlan_ifname[IFNAMSIZ]; int i, ret; - wpa_printf(MSG_DEBUG, "VLAN: vlan_dellink(%s)", ifname); - for (first = prev = vlan = hapd->conf->vlan; vlan; prev = vlan, vlan = vlan->next) { if (os_strcmp(ifname, vlan->ifname) != 0) continue; + wpa_printf(MSG_DEBUG, "VLAN:%s: vlan_dellink(%s)", + hapd->conf->iface, ifname); + int untagged = vlan_untagged(&vlan->vlan_id); if (untagged > 0) { vlan_dellink_vlan(untagged, ifname, vlan->clean, hapd);