[Bug 1867375] Re: systemd-networkd: UseRoutes behavior change with introduction of UseGateway param
Launchpad Bug Tracker
1867375 at bugs.launchpad.net
Thu May 14 18:37:31 UTC 2020
This bug was fixed in the package systemd - 245.5-2ubuntu2
---------------
systemd (245.5-2ubuntu2) groovy; urgency=medium
[ Dan Streetman ]
* network: Change IgnoreCarrierLoss default to value of ConfigureWithoutCarrier.
This fixes bridges with static IP configuration. (LP: #1860926)
File: debian/patches/lp1860926-network-Change-IgnoreCarrierLoss-default-to-value-of.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=59d655136ca05d830d46e5cd90e6b549406cd670
* Cherry-pick fix from upstream master to adjust UseGateway= default
- network: change UseGateway= default to UseRoutes= setting
- network: honor SetDNSRoutes= even if UseGateway=False (LP: #1867375)
Files:
- debian/patches/network-change-UseGateway-default-to-UseRoutes-setting.patch
- debian/patches/network-honor-SetDNSRoutes-even-if-UseGateway-False.patch
- debian/patches/test-modify-add-tests-for-UseRoutes-and-UseGateway-config.patch
- debian/patches/test-verify-RoutesToDNS-is-independent-of-UseGateway.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=4ddb639d6bb0ca07368348bc588c21c41f08a5e7
* refresh quilt patches
[ Balint Reczey ]
* Rename a few patches which are expected to stay longer in Ubuntu
Files:
- debian/patches/Revert-cgroup-Continue-unit-reset-if-cgroup-is-busy.patch
- debian/patches/Revert-namespace-be-more-careful-when-handling-namespacin.patch
- debian/patches/resolved-Mitigate-DVE-2018-0001-by-retrying-NXDOMAIN-with.patch
- debian/patches/debian/UBUNTU-Revert-cgroup-Continue-unit-reset-if-cgroup-is-busy.patch
- debian/patches/debian/UBUNTU-Revert-namespace-be-more-careful-when-handling-namespacin.patch
- debian/patches/debian/UBUNTU-resolved-Mitigate-DVE-2018-0001-by-retrying-NXDOMAIN-with.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=41e97add3900c761fafc58c7a2b024f7b618d313
* test: Skip test-boot-timestamps on permission denied.
This fixes root-unittests in unprivileged LXD containers
File: debian/patches/test-Skip-test-boot-timestamps-on-permission-denied.patch
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=b98a63c04e9e82b0f57617e21233aa103b069785
* tests: Skip test-execute in containers
File: debian/tests/root-unittests
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=2d6f282bf20866f711c6ae509228b0c513218ca9
* Run some tests in LXD, too
Files:
- debian/tests/control
- debian/tests/tests-in-lxd
https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=bf0bb5176284d9ec1b348b84e70f961ee12e3cac
-- Balint Reczey <rbalint at ubuntu.com> Tue, 12 May 2020 16:59:54 +0200
** Changed in: systemd (Ubuntu Groovy)
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1867375
Title:
systemd-networkd: UseRoutes behavior change with introduction of
UseGateway param
Status in netplan.io package in Ubuntu:
Confirmed
Status in systemd package in Ubuntu:
Fix Released
Status in netplan.io source package in Bionic:
Invalid
Status in systemd source package in Bionic:
In Progress
Status in netplan.io source package in Eoan:
Invalid
Status in systemd source package in Eoan:
In Progress
Status in netplan.io source package in Focal:
Confirmed
Status in systemd source package in Focal:
Fix Committed
Status in netplan.io source package in Groovy:
Confirmed
Status in systemd source package in Groovy:
Fix Released
Bug description:
[impact]
the networkd UseRoutes parameter allowed ignoring all routes provided
by a dhcp4 server, including the route via the dhcp4-provided gateway.
This was the behavior of networkd until recently, and in Focal the
UseRoutes parameter does *not* prevent networkd from adding the route
via the dhcp4-provided gateway. This is now controlled with a new
parameter, UseGateway.
The systemd in Focal unfortunately has part of the upstream code; it
no longer ignores the gateway route when UseRoutes=false is specified,
but also it does not include the UseGateway parameter.
Before Focal, networkd did not allow ignoring dhcpv4 routes and the
gateway separately; the UseRoutes= parameter either used, or ignored,
both. This is why upstream added the UseGateway= paramter, which
should be backported to allow control of ignoring the dhcpv4 routes
and gateway separately.
[test case]
In Focal, bug 1872589 has a good test case netplan config, but a very
quick test can be done with the networkd config:
[Match]
Name=eth0
[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6
[DHCP]
RouteMetric=100
UseMTU=true
UseRoutes=false
this results in the system incorrectly setting a route via the default
gateway:
root at lp1867375-f:~# ip r
default via 10.202.51.1 dev eth0 proto dhcp src 10.202.51.86 metric 100
10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.86
10.202.51.1 dev eth0 proto dhcp scope link src 10.202.51.86 metric 100
Before Focal, the above test case shows "correct" behavior, but there
is no way to ignore the dhcpv4 routes but use the dhcpv4 gateway.
This pre-Focal, the test case would be to use the UseGateway=
parameter, e.g.:
[Match]
Name=eth0
[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6
[DHCP]
RouteMetric=100
UseMTU=true
UseRoutes=false
UseGateway=true
which *should* result in the default gateway being configured:
root at lp1867375-f:~# ip r
default via 10.202.51.1 dev eth0 proto dhcp src 10.202.51.86 metric 100
10.202.51.0/24 dev eth0 proto kernel scope link src 10.202.51.86
10.202.51.1 dev eth0 proto dhcp scope link src 10.202.51.86 metric 100
[regression potential]
Any regression would likely involve incorrect setting, or ignoring, of
dhcpv4-provided routes, and/or incorrect setting, or ignoring, of the
dhcpv4-provided gateway.
[scope]
This is fixed by these upstream PRs:
https://github.com/systemd/systemd/pull/15443
https://github.com/systemd/systemd/pull/15136
https://github.com/systemd/systemd/pull/14983
Parts of all those PRs are required in Focal, Eoan, and Bionic.
I am not fixing this for Xenial, at this time.
For Debian, I opened this MR:
https://salsa.debian.org/systemd-team/systemd/-/merge_requests/92
For Groovy, I opened this MR:
https://code.launchpad.net/~ddstreet/ubuntu/+source/systemd/+git/systemd/+merge/383661
[other info]
to properly support separation of 'routes' and 'gateways' received via
dhcp4, SRU releases should also support the UseGateway parameter,
which is what this bug was originally opened requesting.
[original description]
requesting backport of PR https://github.com/systemd/systemd/pull/14983 which fixes the issue described in
https://github.com/systemd/systemd/issues/14982 to 18.04 (bionic)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1867375/+subscriptions
More information about the foundations-bugs
mailing list