--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
-@@ -119,6 +119,29 @@ static void hostapd_reload_bss(struct ho
+@@ -142,6 +142,29 @@ static void hostapd_reload_bss(struct ho
#endif /* CONFIG_NO_RADIUS */
ssid = &hapd->conf->ssid;
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
/*
-@@ -220,6 +243,7 @@ int hostapd_reload_config(struct hostapd
+@@ -250,6 +273,7 @@ int hostapd_reload_config(struct hostapd
struct hostapd_data *hapd = iface->bss[0];
struct hostapd_config *newconf, *oldconf;
size_t j;
if (iface->config_fname == NULL) {
/* Only in-memory config in use - assume it has been updated */
-@@ -270,24 +294,20 @@ int hostapd_reload_config(struct hostapd
+@@ -300,6 +324,17 @@ int hostapd_reload_config(struct hostapd
}
iface->conf = newconf;
+
for (j = 0; j < iface->num_bss; j++) {
hapd = iface->bss[j];
+ if (!hapd->conf->config_id || !newconf->bss[j]->config_id ||
+@@ -307,21 +342,6 @@ int hostapd_reload_config(struct hostapd
+ newconf->bss[j]->config_id) != 0)
+ hostapd_clear_old_bss(hapd);
hapd->iconf = newconf;
- hapd->iconf->channel = oldconf->channel;
- hapd->iconf->acs = oldconf->acs;