You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: network module shows a saved/preferred SSID (stale Wi-Fi name) when Wi-Fi is off on macOS #396
listpreferredwirelessnetworks lists the saved / preferred networks — not the currently associated one. The first saved entry (NR==2) is then used as the fallback whenever networksetup -getairportnetwork reports "You are not associated with an AirPort network."
As a result, when Wi-Fi is OFF but the machine is online via Ethernet, the host ping succeeds, getairportnetwork correctly reports "not associated", and the module falls back to the first saved network — displaying a stale SSID (e.g. an old phone hotspot) the machine is not actually connected to.
Steps to reproduce (macOS 15+ / 26)
Have at least one saved Wi-Fi network (e.g. a phone hotspot used previously).
Turn Wi-Fi off.
Stay online via Ethernet.
The network module shows the first saved network name instead of Ethernet.
Root cause
networksetup -listpreferredwirelessnetworks != current association. It was introduced in #370 as a workaround for ipconfig getsummary returning <redacted> on Darwin >= 25, but it reflects saved networks, so it yields a name even when Wi-Fi is not connected.
Environment
macOS 26.3, tmux 3.6a
dracula/tmux @ current master
Suggested fix
Gate the Wi-Fi branch on the interface actually being associated (ifconfig "$ifname" -> status: active) before consulting any SSID source. A not-associated interface then reports Ethernet/Offline instead of a saved name. This leaves the #370 connected-Wi-Fi SSID resolution untouched, so there's no regression risk for users currently on Wi-Fi. PR incoming.
Activity