Comment 2 for bug 1867375

Revision history for this message
Dan Streetman (ddstreet) wrote : Re: systemd-networkd: Setting UseRoutes to False results in DHCP default gateway not being installed

Upstream this is implemented by two separate PRs:
https://github.com/systemd/systemd/pull/14983
https://github.com/systemd/systemd/pull/15136

Pulling only the first would unfortunately break backwards compatibility for Bionic users who currently expect UseRoutes=False to also ignore the DHCP gateway (just as it broke upstream users when added).

However, also adding the second without any changes would still break backwards compatibility; it only adds a new option (UseGateway) that defaults to true, but current behavior in Bionic ties these options together, i.e. in Bionic for backwards compatibility, we would need to:
1) update the behavior of UseRoutes to only use/ignore DHCP-provided routes, separate from the DHCP-provided gateway
2) add UseGateway option to use/ignore the DHCP-provided gateway
3) add logic so that UseGateway defaults (i.e. if not set) to the setting of UseRoutes

Since this could potentially leave a system without networking if done wrong, I'm not going to include it in my current round of system patches; I'll look at it again next cycle (unless someone else wants to handle it).