netplan ignores NetworkManager ipv4.route-metric
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Fix Released
|
Undecided
|
Unassigned | ||
Ubuntu GNOME |
Invalid
|
Undecided
|
Unassigned | ||
Ubuntu |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Dummy (what I've mainly tested) connections are not being passed the ipv4.route-metric value from NM, instead they have the default value of 550, though this behavior was not observed with the IPv6 protocol.
[Test case]
On Ubuntu 24.04:
1) Create dummy connection via nmcli: nmcli c a type dummy ifname pvpnksintrf0 con-name pvpn-killswitch ipv4.method manual ipv4.addresses "100.85.0.1/24" ipv4.gateway "100.85.0.1" ipv6.method manual ipv6.addresses "fdeb:446c:
2) Run the command to show connection info: nmcli c s pvpn-killswitch
2.1) Notice that ipv6.route-metric has been taken but not ipv4.route-metric, even though the data is present under /etc/netplan/
Additionally:
If I configure the dummy connection via netplan and for the ipv4.route-metric to take effect, I need to either pass dhcp4: true (by switching ipv4.method auto, though this other implications when IPv6 is disabled at kernel level) or ipv4.route-metric: 98 in the pass-through section (to which I don't have access via NM).
The current behavior breaks the Proton VPN linux app on all Ubuntu 24.04 machines.
Hello, thanks for bringing this issue to our attention and working on a fix for it.
I saw that you created a PR on Github as well [1] (which is the preferred way of submitting patch to Netplan). I just left some comments there.
Thanks!
[1] - https:/ /github. com/canonical/ netplan/ pull/495