networkd: [Route] PreferredSource not working in *.network files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd |
Fix Released
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Fix Released
|
Medium
|
Dimitri John Ledkov | ||
Bionic |
Fix Released
|
Medium
|
Dan Streetman | ||
Cosmic |
Fix Released
|
Medium
|
Dan Streetman | ||
Disco |
Fix Released
|
Medium
|
Dimitri John Ledkov |
Bug Description
[Impact]
Users cannot create IPv6 routes that specify PreferredSource. This means that users cannot specify a number of valid IPv6 routes that are useful in some circumstances. These routes can be created with the 'ip' tool, just not with systemd.
This was reported upstream in systemd issue #5882 is fixed by pulling in the changes in systemd PR #11375 - https:/
[Test Case]
Start a Bionic or Cosmic VM.
Add the following netplan yaml (adjust for ethernet card and MAC):
network:
version: 2
ethernets:
ens3:
dhcp4: true
match:
routes:
- to: "a::/16"
- to: "fd8f:1d7d:
Run netplan apply or reboot. Wait ~10s.
Alternately, to test without netplan, configure systemd-networkd with:
[Match]
Name=ens3
[Network]
DHCP=ipv4
LinkLocalAddres
Address=
Address=
[Route]
Destination=a::/16
Gateway=
PreferredSource
[Route]
Destination=
PreferredSource
Scope=link
Metric=255
[DHCP]
UseMTU=true
RouteMetric=100
Currently, ip -6 route will not include a route to "a::/16", and will not include the route to "fd8f:1d7d:
Correct behaviour is for ip -6 route to report the following:
ubuntu@b-np:~$ ip -6 route
a::/16 via fd8f:1d7d:b141::1 dev ens3 proto static src fd8f:1d7d:b141::2 metric 1024 pref medium
fd8f:1d7d:b141::/64 dev ens3 proto static src fd8f:1d7d:b141::2 metric 255 pref medium
fd8f:1d7d:b141::/64 dev ens3 proto kernel metric 256 pref medium
fe80::/64 dev ens3 proto kernel metric 256 pref medium
Check before and after upgrade that 'systemctl status network-
[Regression Potential]
This changes the state machine in systemd which configures the links. It passes systemd's internal tests, and has been approved by systemd maintainers, but it remains possible that the changes will break the configuration of obscure network setups.
The backport requires pulling in two further commits that also change behaviour: currently systemd deletes all addresses and routes that were attached to an interface. With this change, it will only delete those that are not specified in the configuration files. A side effect of this is that restarting networkd will not cause remove/add netlink events to be emitted for these addresses, so if anyone is relying on this behavior this will break compatibility; but that is an unlikely thing to be relying on, and it seems worth this risk to reduce unnecessary network state changes.
Related branches
- Christian Ehrhardt (community): Needs Fixing
- Dimitri John Ledkov: Pending requested
- Canonical Server Core Reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 498 lines (+458/-0)6 files modifieddebian/changelog (+15/-0)
debian/patches/Install-routes-after-addresses-are-ready.patch (+98/-0)
debian/patches/Move-link_check_ready-to-later-in-the-file.patch (+147/-0)
debian/patches/networkd-don-t-remove-ip-address.patch (+92/-0)
debian/patches/networkd-don-t-remove-route.patch (+102/-0)
debian/patches/series (+4/-0)
- Christian Ehrhardt (community): Needs Fixing
- Dimitri John Ledkov: Pending requested
- Canonical Server Core Reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 498 lines (+458/-0)6 files modifieddebian/changelog (+15/-0)
debian/patches/Install-routes-after-addresses-are-ready.patch (+98/-0)
debian/patches/Move-link_check_ready-to-later-in-the-file.patch (+147/-0)
debian/patches/networkd-don-t-remove-ip-address.patch (+92/-0)
debian/patches/networkd-don-t-remove-route.patch (+102/-0)
debian/patches/series (+4/-0)
Changed in systemd (Ubuntu): | |
status: | Confirmed → In Progress |
assignee: | nobody → Daniel Axtens (daxtens) |
tags: | added: sts |
Changed in systemd (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Cosmic): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Cosmic): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Disco): | |
importance: | Undecided → Medium |
Changed in systemd (Ubuntu Cosmic): | |
assignee: | nobody → Daniel Axtens (daxtens) |
Changed in systemd (Ubuntu Bionic): | |
assignee: | nobody → Daniel Axtens (daxtens) |
Changed in systemd (Ubuntu Disco): | |
status: | In Progress → Fix Committed |
assignee: | Daniel Axtens (daxtens) → Dimitri John Ledkov (xnox) |
Changed in systemd (Ubuntu Cosmic): | |
status: | In Progress → Triaged |
Changed in systemd (Ubuntu Cosmic): | |
assignee: | Daniel Axtens (daxtens) → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Bionic): | |
assignee: | Daniel Axtens (daxtens) → Dan Streetman (ddstreet) |
Changed in systemd (Ubuntu Cosmic): | |
status: | Triaged → In Progress |
tags: |
added: verification-failed verification-failed-bionic removed: verification-done-bionic verification-needed |
Changed in systemd (Ubuntu Bionic): | |
status: | Fix Committed → In Progress |
Changed in systemd (Ubuntu Cosmic): | |
status: | Fix Committed → In Progress |
tags: | removed: verification-failed verification-failed-bionic verification-failed-cosmic |
description: | updated |
This bug was fixed in the package systemd - 240-5ubuntu3
---------------
systemd (240-5ubuntu3) disco; urgency=medium
* debian/tests: blacklist upstream test-24-unit-tests on ppc64le. tests/upstream /git.launchpad. net/~ubuntu- core-dev/ ubuntu/ +source/ systemd/ commit/ ?id=8062b9a2712 c390010d2948eaf 764a1b52e68715
Fails, not a regression as it's a new test case, which was never before
executed on ppc64le.
File: debian/
https:/
-- Dimitri John Ledkov <email address hidden> Sat, 02 Feb 2019 11:05:12 +0100