wifi: Encryption settings are not applied to guest network, just the regular wifi network
Description
Update of wifi settings will send wrong value for guest network encryption, regardless of the selected encryption for the regular wifi.
Foris-controller supports setting different encryption modes for regular and guest wifi, however we don't have separate input field for guest network encryption in WiFi page.
Thus in most cases, it will send "WPA2/3" as guest network encryption in POST request.
My guess is that this is caused by the fact that we don't process the guest_wifi.encryption
value (from GET request) in WiFi form and this value is just sent back within the POST request data for update of wifi settings.
I also believe, that value "WPA2/3" comes from defaults provided by foris-controller, in case the guest wifi settings are missing. Otherwise we receive and send back whatever value is in uci configuration (from LuCI, by hand, ...).
Proposed solution
- a) Either use
encryption
value forguest_wifi.encryption
, i.e. force the same encryption method for both networks. - b) Or add additional input to form, which will allow to select encryption method for guest wifi too.