[PATCH v5 20/22] VLAN: reduce newlink/dellink message printing

Michael Braun michael-dev
Tue Nov 19 11:48:20 PST 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>
---
 src/ap/vlan_init.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c
index 8b8849b..ab6ac97 100644
--- a/src/ap/vlan_init.c
+++ b/src/ap/vlan_init.c
@@ -659,12 +659,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);
@@ -766,13 +766,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