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

Michael Braun michael-dev
Thu Jun 6 03:09:49 PDT 2013


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 at fami-braun.de>

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



More information about the Hostap mailing list