networking: handle omitted mode setting in NM

This commit is contained in:
Carson Powers authored and outfoxxed committed 2026-08-25 23:14:48 -07:00
1 parent 39e14d3627
commit 052059fb7c
1 file changed
+2 -1
+2 -1
View File
@@ -124,7 +124,8 @@ void NMWirelessDevice::onSettingsLoaded(NMSettings* settings) {
const auto ssid = map["802-11-wireless"]["ssid"].toString();
const auto mode = map["802-11-wireless"]["mode"].toString();
if (mode == "infrastructure") {
// Omitted mode is assumed to be "infrastructure".
if (mode.isEmpty() || mode == "infrastructure") {
auto* net = this->mNetworks.value(ssid);
if (!net) net = this->registerNetwork(ssid);
net->addSettings(settings);