Report the link carrying a VPN rather than the tunnel - #6741
Closed
KazeTachinuu wants to merge 1 commit into
Closed
KazeTachinuu wants to merge 1 commit into
KazeTachinuu wants to merge 1 commit into
Conversation
Wifi or ethernet is a question about hardware: a wireless directory or a device symlink under /sys/class/net. The status command asked it of whichever device held the internet route and read everything that wasn't wireless as ethernet, so a wireguard or tun device, which is neither, came back ethernet for want of anywhere else to land. With a VPN up the panel reads Ethernet on a laptop sitting on wifi, and the rest of the reading follows the tunnel: the gateway is empty so the router ping never runs, the counters and link speed come off an interface that has no speed to report, the sections naming the network and its band are gone, and reading /sys/class/net/<tunnel>/speed prints an error over the output. Resolve the link before classifying it. Policy routing leaves the carrier on the main table's default, so take the first default there with hardware behind it. Where the path is virtual the whole way down, a container overlay among others, keep the device the route named: that reading is no worse than before, and a working connection should not report itself disconnected.
KazeTachinuu
marked this pull request as ready for review
August 12, 2026 10:40
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
Automated duplication check: this pull request looks similar to #8866, which covers the same physical-link resolution under VPN tunnels. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The network panel says Ethernet while you're on wifi, whenever a VPN is up. The header reads Ethernet with the wifi icon sitting right above it in the bar, since the two come from different sources.
It takes whatever device holds the internet route and calls it ethernet if it isn't wireless. A wireguard or tun interface is neither, and the rest of the reading comes off the tunnel instead of the wifi card: no gateway, so the router ping never runs; byte counters and link speed from an interface that has no speed; an error printed from
cat /sys/class/net/<tunnel>/speed; and the header network name, the band section and the QR share all go missing.Fix: find the real interface first, then ask whether it's wifi or ethernet. Real hardware has a wireless directory or a device symlink in
/sys/class/net, and when a tunnel holds the route, the main routing table still points at the card carrying it.If nothing on the path has hardware behind it, inside a container for instance, it keeps the routed device rather than claiming you're disconnected.