Opened 2 years ago

Closed 2 years ago

#12330 closed defect (fixed)

Fix systemd-networkd to work with 5.2+ kernels

Reported by: Douglas R. Reno Owned by: Douglas R. Reno
Priority: normal Milestone: 9.0
Component: BOOK Version: SVN
Severity: normal Keywords:


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:

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:

(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:

Thank you, Wayne, for initially discovering the networkd issue:

Change History (2)

comment:1 by Douglas R. Reno, 2 years ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

comment:2 by Douglas R. Reno, 2 years ago

Resolution: fixed
Status: assignedclosed

Fixed at r21912

In addition, tweaks had to be made to allow for compilation with modern libseccomp, as well as GnuTLS support being disabled due to incompatibilites with the API (causes relocation errors in systemd-resolved, that'll likely be fixed whenever 243 comes out). It has OpenSSL support already, so it should be fine

Note: See TracTickets for help on using tickets.