#1130573 cloud-init: IPv6 default route rendered incorrectly

Package:
cloud-init
Source:
cloud-init
Submitter:
James McEwan
Date:
2026-03-19 12:43:02 UTC
Severity:
normal
Tags:
#1130573#5
Date:
2026-03-13 09:00:27 UTC
From:
To:
Dear Maintainer,

Attempting to set IPv6 default route using "to: ::/0" under the "routes" section in the network-config. However, cloud-init instead configures a route to "::/64".

cloud-init network-config:

network:
    version: 2
    ethernets:
        ens192:
            addresses:
            - 10.0.0.2/24
            - 2001:db8:1::2/64
            routes:
            - to: 0.0.0.0/0
              via: 10.0.0.1
            - to: ::/0
              via: 2001:db8:1::1


cloud-init rendered network config:

auto lo
iface lo inet loopback

auto ens192
iface ens192 inet static
    address 10.0.0.2/24
    post-up route add default gw 10.0.0.1 || true
    pre-down route del default gw 10.0.0.1 || true
    post-up route add -A inet6 ::/64 gw 2001:db8:1::1 || true
    pre-down route del -A inet6 ::/64 gw 2001:db8:1::1 || true

iface ens192 inet6 static
    address 2001:db8:1::2/64


I believe this has already been fixed upstream: https://github.com/canonical/cloud-init/pull/1973.

It is possible to backport this fix to Debian 12?

#1130573#10
Date:
2026-03-17 15:23:33 UTC
From:
To:
https://salsa.debian.org/noahm/cloud-init/-/commit/48bb341376ce8a4dab298d4a87567a868c1e26bc

If I provide .debs, will you be able to confirm that they fix the issue
in your environment?

noah

#1130573#15
Date:
2026-03-19 12:41:06 UTC
From:
To:
Yes, I will be able to test the fix if you provide me with the .debs.

Regards,
James.

https://salsa.debian.org/noahm/cloud-init/-/commit/48bb341376ce8a4dab298d4a87567a868c1e26bc

If I provide .debs, will you be able to confirm that they fix the issue
in your environment?

noah