A long wifi interface name (in my case wlp0s20f3) causes wpa_supplicant to crash. This is due to a bug in wpa_supplicant that has since been fixed (commit), but the fix has not yet been released (version 2.9 does not contain the fix, as seen here).
I encountered this when trying to connect to wifi during a NixOS install from the minimal ISO. The workarounds I found were to either use a wired connection or use a different ISO that provided NetworkManager.
Steps To Reproduce
There's probably an easier way to repro, but these are the steps that I used to reproduce the behavior:
Get a machine whose wifi interface has a sufficiently long name, such as wlp0s20f3.
To configure the wifi, first start wpa_supplicant with sudo systemctl start wpa_supplicant, then run wpa_cli ...
The messages from wpa_cli will make it appear to have worked, however, subsequently testing connectivity will prove otherwise, and checking logs (journalctl -f -u wpa_supplicant) will reveal failure.
Expected behavior
wpa_supplicant provides a working wifi connection.
Additional context
Looking for the root cause led me to a similar report, requesting that the fix be included in wpa_supplicant on Debian, and a discussion on GitLab that explained the issue.
tl;dr If you have an interface name that is quite long (in my case wlp0s20f2), adding the "p2p-dev-" will make it bigger than the allowed length of 15, which causes wpa_supplicant to segfault.
Describe the bug
A long wifi interface name (in my case
wlp0s20f3
) causes wpa_supplicant to crash. This is due to a bug in wpa_supplicant that has since been fixed (commit), but the fix has not yet been released (version 2.9 does not contain the fix, as seen here).The fix is small and I think adding it to the patches in the wpa_supplicant nix expression would address this issue.
I encountered this when trying to connect to wifi during a NixOS install from the minimal ISO. The workarounds I found were to either use a wired connection or use a different ISO that provided NetworkManager.
Steps To Reproduce
There's probably an easier way to repro, but these are the steps that I used to reproduce the behavior:
wlp0s20f3
.wpa_cli
will make it appear to have worked, however, subsequently testing connectivity will prove otherwise, and checking logs (journalctl -f -u wpa_supplicant
) will reveal failure.Expected behavior
wpa_supplicant provides a working wifi connection.
Additional context
Looking for the root cause led me to a similar report, requesting that the fix be included in wpa_supplicant on Debian, and a discussion on GitLab that explained the issue.
Notify maintainers
@MarcWeber @Ma27
Metadata
The result of running
nix-shell -p nix-info --run "nix-info -m"
from a bootable USB with the minimal ISO (https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-x86_64-linux.iso):