[PATCH v2 1/2] wps: reconfigure credentials on reload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When new credentials are configured and hostapd is reconfigured using
SIGHUP (or reload on the ctrl_iface), also update the wps credentials.

Before these changes, when WPS is triggered the registar always serves
the credentials that were configured when hostapd started.

Signed-off-by: Raphaël Mélotte <raphael.melotte@xxxxxxx>

---
Changes v1 -> v2:
  - add missing ifdef for CONFIG_WEP

Signed-off-by: Raphaël Mélotte <raphael.melotte@xxxxxxx>
---
 src/ap/wps_hostapd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c
index 8b1dad518..ff942a67b 100644
--- a/src/ap/wps_hostapd.c
+++ b/src/ap/wps_hostapd.c
@@ -1471,6 +1471,7 @@ void hostapd_update_wps(struct hostapd_data *hapd)
 		wpa_snprintf_hex((char *) wps->network_key, 2 * PMK_LEN + 1,
 				 conf->ssid.wpa_psk->psk, PMK_LEN);
 		wps->network_key_len = 2 * PMK_LEN;
+#ifdef CONFIG_WEP
 	} else if (conf->ssid.wep.keys_set && conf->ssid.wep.key[0]) {
 		wps->network_key = os_malloc(conf->ssid.wep.len[0]);
 		if (wps->network_key == NULL)
@@ -1478,6 +1479,7 @@ void hostapd_update_wps(struct hostapd_data *hapd)
 		os_memcpy(wps->network_key, conf->ssid.wep.key[0],
 			  conf->ssid.wep.len[0]);
 		wps->network_key_len = conf->ssid.wep.len[0];
+#endif /* CONFIG_WEP */
 	}
 
 	if (conf->ssid.wpa_psk) {
-- 
2.29.2


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux