hostapd: restart wifi when the bssid of the first interface changes
Full restart is necessary, since the bss wdev is not re-created Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
c1600df91f
commit
f1c4751ba6
1 changed files with 6 additions and 0 deletions
|
@ -136,6 +136,9 @@ function iface_reload_config(phy, config, old_config)
|
||||||
if (phy_is_fullmac(phy))
|
if (phy_is_fullmac(phy))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (config.bss[0].bssid != old_config.bss[0].bssid)
|
||||||
|
return false;
|
||||||
|
|
||||||
hostapd.printf(`Reload config for bss '${config.bss[0].ifname}' on phy '${phy}'`);
|
hostapd.printf(`Reload config for bss '${config.bss[0].ifname}' on phy '${phy}'`);
|
||||||
if (iface.bss[0].set_config(config_inline, 0) < 0) {
|
if (iface.bss[0].set_config(config_inline, 0) < 0) {
|
||||||
hostapd.printf(`Failed to set config`);
|
hostapd.printf(`Failed to set config`);
|
||||||
|
@ -269,6 +272,9 @@ function iface_load_config(filename)
|
||||||
if (!val[0])
|
if (!val[0])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (val[0] == "bssid")
|
||||||
|
bss.bssid = val[1];
|
||||||
|
|
||||||
if (val[0] == "bss") {
|
if (val[0] == "bss") {
|
||||||
bss = config_add_bss(config, val[1]);
|
bss = config_add_bss(config, val[1]);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue