From 8b0953ab116bfc12ecc24959b6d66a729802126b Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Sun, 5 Jan 2025 12:53:07 +0100 Subject: [PATCH] gluon-core: rename psk3 to sae as it is used in openwrt that way add proper migration for older uci setting Signed-off-by: Florian Maurer --- .../luasrc/lib/gluon/upgrade/325-gluon-private-wifi | 5 +++++ .../luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package/gluon-private-wifi/luasrc/lib/gluon/upgrade/325-gluon-private-wifi b/package/gluon-private-wifi/luasrc/lib/gluon/upgrade/325-gluon-private-wifi index 8facf45d95..2485847cd2 100755 --- a/package/gluon-private-wifi/luasrc/lib/gluon/upgrade/325-gluon-private-wifi +++ b/package/gluon-private-wifi/luasrc/lib/gluon/upgrade/325-gluon-private-wifi @@ -13,6 +13,11 @@ wireless.foreach_radio(uci, function(radio) end uci:set('wireless', name, 'ifname', suffix and 'wl-wan' .. suffix) + + -- migrate encryption from Gluon v2023.2.x or older + -- remove in 2027 or on first release supporting only upgrades from >=v2025.1.x + local encryption = uci:get('wireless', name, 'encryption') + uci:set('wireless', name, 'encryption', encryption:gsub("psk3", "sae")) end) uci:save('wireless') diff --git a/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua index 1be55abdff..fae83c74c0 100644 --- a/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua +++ b/package/gluon-web-private-wifi/luasrc/lib/gluon/config-mode/model/admin/privatewifi.lua @@ -49,8 +49,8 @@ local encryption = s:option(ListValue, "encryption", translate("Encryption")) encryption:depends(enabled, true) encryption:value("psk2", translate("WPA2")) if wireless.device_supports_wpa3() then - encryption:value("psk3-mixed", translate("WPA2 / WPA3")) - encryption:value("psk3", translate("WPA3")) + encryption:value("sae-mixed", translate("WPA2 / WPA3")) + encryption:value("sae", translate("WPA3")) end encryption.default = uci:get('wireless', primary_iface, 'encryption') or "psk2"