Fix systemd-networkd to work with 5.2+ kernels
|Reported by:||Douglas R. Reno||Owned by:||Douglas R. Reno|
In Linux Kernel 5.2+, The IPv6 implementation was changed in the kernel, in particular the way that it responds to calls towards it's API for bringing interfaces up.
As a result, systemd-networkd will refuse to bring up any network interfaces that are on the system, either at startup or manually. systemd-networkd will return the following output:
enp3s0: Could not bring up interface: Invalid argument
You must instead bring up the interface manually through the kernel, and then systemd will recognize the flag change and begin bringing up DHCP services or assigning a static if necessary:
sudo ip link set enp3s0 up
However, as Paul Menzel from Debian noted, this isn't always guaranteed to work either.
As far as I can tell (I'm running dhcpcd on my system with networkd brought down), dhcpcd isn't affected. I have NOT tested dhclient though, I'll probably do that when I'm done with this seeing as it could be related.
Upstream bug report: https://github.com/systemd/systemd/issues/12784
We need to apply the following patches for systemd to allow this to work:
On that same note, we should apply the following fix as well, for users of AMD Ryzen systems:
https://github.com/systemd/systemd/commit/1c53d4a070edbec8ad2d384ba0014d0eb6bae077 https://github.com/systemd/systemd/commit/7f2cdceaed4d37c4e601e531c7d863fca1bd1460 https://github.com/systemd/systemd/commit/328f850e36e86d14ab06d11fa8f2397e9575a7f9
(This fixes issues with the Random Number Generator on Ryzen systems that will cause the system to fail to start due to firmware changes and the way that they interact with 5.2+ kernels. AMD is still preparing a firmware update for their CPUs to fix this. This seems to be due to the RDRAND instruction in AMD Excavator-era CPUs in particular).
Upstream bug report for that: https://github.com/systemd/systemd/issues/11810
Thank you, Wayne, for initially discovering the networkd issue: http://lists.linuxfromscratch.org/pipermail/lfs-support/2019-July/052952.html