Opened 5 years ago

Closed 5 years ago

#4506 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:
Cc:

Description

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:

https://github.com/systemd/systemd/commit/4eb086a38712ea98faf41e075b84555b11b54362 https://github.com/systemd/systemd/commit/9f6e82e6eb3b6e73d66d00d1d6eee60691fb702f

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

Change History (3)

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

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

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

I've dropped a patch into the patches repo at r3971. It passed a simple build test in /tmp on my system, but I'm running it through jhalfs now to make sure things are working as expected.

comment:3 by Douglas R. Reno, 5 years ago

Resolution: fixed
Status: assignedclosed

Fixed at r11648. Now for BLFS...

Note: See TracTickets for help on using tickets.