fix: do not treat TUN route devices as the bar's network - #9666
Conversation
ip route get follows split tables onto Meta/tailscale, so the widget reported ethernet while NetworkManager still had Wi-Fi connected.
|
Reviewed against What it fixes. The reported case works. With a TUN device owning the route to 1.1.1.1 and NetworkManager reporting a connected Wi-Fi device, The bar goes dark when there is no Wi-Fi to fall back to. That is a wired desktop on a VPN, and the widget now says it is offline while it is online. Same for a WireGuard-only or tethered box whose only connectivity is the tunnel, and for a Tailscale exit node on a wired machine. Retaining the routed device when no replacement is found would keep the fix and drop this case. Two real WAN link types are classified as tunnels. This is Codex's finding, not something I had reasoned about, and the mechanism holds up in the kernel sources: type The The driver exposes The test passes whether or not the fix is present. Smaller.
Tests. On the worker: Nothing was pushed to your branch. #9652 fixes the same issue (#9624) with a different rule, so this is two designs for one behaviour rather than one being a correction of the other, and which one lands is the maintainer's call — neither PR is being closed or edited here. The |
Closes #9624
Split-table VPNs (e.g. Meta) win
ip route get 1.1.1.1with a TUN iface that has no wireless sysfs, so the bar prints ethernet/Meta while nmcli still has wifi connected.After
ip route get, if the iface is TUN/TAP (type 65534) or PPP (512), fall back to the nmcli wifi device inconnected. Sysfs root is overridable viaOMARCHY_NET_SYSFSfor the pin.test/shell.d/network-status-tun-test.shPASS on5f1a7be9.