[PATCH 2/2] hostapd: return ifname of current context

Eliad Peller eliad at wizery.com
Sun Mar 6 01:42:38 PST 2016


In case of multiple bss, return the current interface
name, instead of the first one.

Signed-off-by: Eliad Peller <eliad at wizery.com>
---
 hostapd/main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hostapd/main.c b/hostapd/main.c
index 06aa4b2..25dc20b 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -474,9 +474,8 @@ static void usage(void)
 static const char * hostapd_msg_ifname_cb(void *ctx)
 {
 	struct hostapd_data *hapd = ctx;
-	if (hapd && hapd->iconf && hapd->iconf->bss &&
-	    hapd->iconf->num_bss > 0 && hapd->iconf->bss[0])
-		return hapd->iconf->bss[0]->iface;
+	if (hapd && hapd->conf)
+		return hapd->conf->iface;
 	return NULL;
 }
 
-- 
2.6.3




More information about the Hostap mailing list