Patchwork [PATCHv2,17/21] VLAN: reduce newlink/dellink message printing

login
register
mail settings
Submitter michael-dev@fami-braun.de
Date May 17, 2013, 5:22 p.m.
Message ID <7bc70e3c69c1ad3b0c780aed8ef096284b902e48.1370512966.git.michael-dev@fami-braun.de>
Download mbox | patch
Permalink /patch/249372/
State Superseded
Headers show

Comments

michael-dev@fami-braun.de - May 17, 2013, 5:22 p.m.
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 <michael-dev@fami-braun.de>

Patch

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);