hostapd: Add RELOAD_BSS

When using multiple BSSes on a single radio, it is sometimes desirable
to reconfigure one BSS, without disconnecting the stations already
connected to other BSSes on the same radio.

When a BSS is reconfigured using the SET command, there is no "old"
configuration we can compare to (so we cannot compare a hash of the
configuration for example).

One possible solution would be to make the current RELOAD command
reload only the current BSS. However, that could break the workflow of
existing users. Instead, introduce a new RELOAD_BSS command, which
reloads only the current BSS.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
This commit is contained in:
Raphaël Mélotte 2022-08-01 13:08:26 +02:00 committed by Jouni Malinen
parent 1a27b8838a
commit af1528a128
4 changed files with 38 additions and 0 deletions

View file

@ -2813,6 +2813,21 @@ int hostapd_reload_iface(struct hostapd_iface *hapd_iface)
}
int hostapd_reload_bss_only(struct hostapd_data *bss)
{
wpa_printf(MSG_DEBUG, "Reload BSS %s", bss->conf->iface);
hostapd_set_security_params(bss->conf, 1);
if (hostapd_config_check(bss->iconf, 1) < 0) {
wpa_printf(MSG_ERROR, "Updated BSS configuration is invalid");
return -1;
}
hostapd_clear_old_bss(bss);
hostapd_reload_bss(bss);
return 0;
}
int hostapd_disable_iface(struct hostapd_iface *hapd_iface)
{
size_t j;