Parcourir la source

Do not call driver_init if hostapd interface is not yet configured

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Shan Palanisamy il y a 13 ans
Parent
commit
0dcc4dc4b3
1 fichiers modifiés avec 6 ajouts et 4 suppressions
  1. 6 4
      hostapd/main.c

+ 6 - 4
hostapd/main.c

@@ -339,10 +339,12 @@ hostapd_interface_init(struct hapd_interfaces *interfaces,
 			iface->bss[0]->conf->logger_stdout_level--;
 	}
 
-	if (hostapd_driver_init(iface) ||
-	    hostapd_setup_interface(iface)) {
-		hostapd_interface_deinit_free(iface);
-		return NULL;
+	if (iface->conf->bss[0].iface[0] != 0) {
+		if (hostapd_driver_init(iface) ||
+			hostapd_setup_interface(iface)) {
+			hostapd_interface_deinit_free(iface);
+			return NULL;
+		}
 	}
 
 	return iface;