note8:~# dhcpcd wlan0DUID 00:01:00:01:22:0e:08:1f:00:90:4c:c5:12:38wlan0: IAID 4c:c5:12:38wlan0: rebinding lease of 192.168.0.21wlan0: soliciting an IPv6 routerwlan0: probing for an IPv4LL addresswlan0: DHCP lease expiredwlan0: soliciting a DHCP leasewlan0: offered 192.168.0.21 from 192.168.0.1wlan0: probing address 192.168.0.21/24wlan0: using IPv4LL address 169.254.122.114ipv4_addaddr: if_addaddress: Invalid argumentwlan0: leased 192.168.0.21 for 86400 secondsipv4_addaddr: if_addaddress: Invalid argumentwlan0: no IPv6 Routers availabletimed outdhcpcd exited
The busybox dhcp client (udcpc) works without any problems. However, as pmOS (postmarketos-base to be precise) depends on networkmanager/dhcpcd now, the busybox ifup function no longer uses udhcpc but dhcpcd. Therefore, afaik, there is no easy way to use udhcpc instead of dhcpcd.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Dhclient seems to work. The current NetworkManager build for armhf does not support dhclient, however. A new build with dhclient support should arrive soon (see networkmanager in Alpine). Building NetworkManager using the pmOS build environment results in a broken NetworkManager binary, the binary does not define any dynamic symbols but these are required for loading plugins (which are required for wifi).
Alpine has the new version of NetworkManager for armhf now which has dhclient support. Unfortunately, however, this does not solve this problem. NetworkManager now successfully obtains an IP address and marks the connection as "connected" but in fact setting the IP address fails:
Apparently NetworkManager only gets the IP from dhclient and uses an internal method to set it. Calling dhclient wlan0 afterwards successfully assigns an IP address.
I did already disable mac address randomization before because I saw in the log that it failed. Further, I also added my user to the plugdev group as that was already mentioned in the update message for the new NetworkManager package. So no, unfortunately, that's no fix.
The dhcpcd error comes from ipv4_addaddr() after calling if_address(). As I understand, some Linux syscall gets called in the latter function, which sets the "Invalid argument" error. You could find the syscall, and read its documentation - my guess is, that either there is a kernel option needed to make the syscall work as intended, or that your kernel has it broken for some reason (and you could fix it by comparing to other kernels).
Read the manual of /etc/dhcpcd.conf and /etc/dhclient.conf and play with the configuration values.
Dig into the source of NetworkManager and find out why dhclient fails when called from Networkmanager, but not when called manually (I guess it calls it in a different way?).
Thank you very much for these tips! Trying the second option, I got the following excerpt from an strace of a dhcpcd call which should be the failing call where it tries to set the IP address:
The kernel interface that is called here is rnetlink. I have no idea though what's wrong here or where in the kernel this message is handled. Here is a complete strace of setting the same IP address using ip (which sucessfully assigns the IP address):
The last sendmsg call here is very similar to the one above, one can see the IP address in the call, but it is 8 bytes shorter, basically the end after the IP address is different. Does anybody have any idea where in the kernel this is handled?
Concerning 4: dhclient uses a script to set the IP address. NetworkManager adds a parameter to the dhclient call that sets this script to a different script that simply sends all obtained values to NetworkManager using dbus. The original script of dhclient uses ip to set all values which explains why this works without NetworkManager but not with NetworkManager.