Patchwork [v4,22/25] VLAN: reduce newlink/dellink message printing

login
register
mail settings
Submitter michael-dev@fami-braun.de
Date July 27, 2013, 7:56 p.m.
Message ID <20130727195617.17627.17584.stgit@ray-controller>
Download mbox | patch
Permalink /patch/262524/
State Superseded
Headers show

Comments

michael-dev@fami-braun.de - July 27, 2013, 7:56 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>
---
 src/ap/vlan_init.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Patch

diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c
index 4ea7a9d..24663c4 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);