[PATCH] Hostapd does not update WPS credentials on SIGHUP
Jouni Malinen
j at w1.fi
Sun Oct 11 13:14:47 EDT 2020
On Thu, Aug 20, 2020 at 01:46:57PM +0300, Dmitry Koroban wrote:
> Faced this issue on v2.6, but 2.10 seems to have it too.
> Steps to reproduce:
> 1. Start hostapd with WPS enabled
> 2. Change passphrase in hostapd.conf
> 3. Send SIGHUP to hostapd
> 4. Try to connect client using wps_pbc
> 5. Client receives old passphrase and cannot connect
> diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
> @@ -163,6 +163,9 @@ static void hostapd_reload_bss(struct hostapd_data
> *hapd)
> wpa_printf(MSG_ERROR, "Could not set SSID for kernel
> driver");
> /* try to continue */
> }
> + /* Update WPS credentials */
> + hostapd_deinit_wps(hapd);
> + hostapd_init_wps(hapd, hapd->conf);
> wpa_printf(MSG_DEBUG, "Reconfigured interface %s",
> hapd->conf->iface);
There is a call to hostapd_update_wps() just before this context and
that function is the place to update whatever needs to be updated for
WPS. It would be cleaner to do this type of restarting of WPS there in
case WPS was started before reconfiguration instead of hardcoding
deinit/init to happen after that update function is executed.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list