fix: network: update iface name on connect

This commit is contained in:
Alfredo Monclus committed 2026-03-08 12:13:51 -03:00
1 parent 78b02ef026
commit 543dc823cc
1 file changed
+8
+8
View File
@@ -365,6 +365,14 @@ class SdbusNm:
if target_connection := self.get_connection_path_by_ssid(ssid):
self.popup(f"{ssid}\n{_('Starting WiFi Association')}", 1)
try:
# Update the “interface‑name”
con = NetworkConnectionSettings(target_connection)
settings = con.get_settings()
if ("802-11-wireless" in settings
and settings["802-11-wireless"].get("mode") == ("s", "infrastructure")):
settings["connection"]["interface-name"] = ("s", self.wlan_device.interface)
con.update(settings)
active_connection = self.nm.activate_connection(target_connection)
return target_connection
except Exception as e: