Route not applied in the define order

Bug #1796258 reported by Jean-Daniel Dupas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

I have a configuration file with dependent routes:

  network:
    version: 2
    renderer: networkd
    ethernets:
        eth0:
          addresses:
            - "2001:41d0:8:xxxx::1/128"
          routes:
            # Route to gateway
            - { to: "2001:41d0:8:8fff:ff:ff:ff:ff/128", scope: link }
            - { to: "::/0", via: "2001:41d0:8:8fff:ff:ff:ff:ff" }

The scope link route must be applied before the gateway route, else adding the gateway route fails with 'No route to host' error.

Unfortunately, it looks like there is a bug in systemd-networkd that make the route applied in reverse order: https://github.com/systemd/systemd/issues/5430

If I reverse the route order in the netplan config (and so it is also reversed in systemd generated file), the scope route is properly created before the gateway route.

Should netplan try to generate the routes in reverse order to workaround the systemd bug (maybe it should also be able to detect systemd version to adapt the behavior if it changes in a future systemd release) ?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.