Skip to content

Ubuntu 26: linux.rs assumes wlan0; fails on systems with predictable network interface names (e.g. wlp2s0) #39

Description

@tarkus1

`crates/unlocker-helper/src/ops/linux.rs` assumes the Wi-Fi interface is
named `wlan0`. On Ubuntu 26 (and generally any distro using systemd's
predictable network interface naming, which has been the default for years
now), the actual interface name is something like `wlp2s0` — derived from
the device's physical bus location — not `wlan0`.

I had to manually edit the hardcoded name to get the hotspot to bind to the
correct interface.

The code already discovers the Wi-Fi device correctly via NetworkManager's
D-Bus API in `wifi_device_path()` — it shouldn't need a hardcoded interface
name at all. Wherever the literal `wlan0` string is used downstream (outside
the D-Bus device path lookup), it should instead query NM for the device's
actual `Interface` property, or use the D-Bus device path directly rather
than assuming a name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions