diff --git a/cloud-init-write-routes.patch b/cloud-init-write-routes.patch index 2e99247..ddae779 100644 --- a/cloud-init-write-routes.patch +++ b/cloud-init-write-routes.patch @@ -10,7 +10,7 @@ Index: cloudinit/distros/opensuse.py from cloudinit import helpers from cloudinit import log as logging -@@ -174,7 +175,140 @@ class Distro(distros.Distro): +@@ -174,7 +175,147 @@ class Distro(distros.Distro): util.write_file(out_fn, str(conf), 0o644) def _write_network_config(self, netconfig): @@ -34,6 +34,7 @@ Index: cloudinit/distros/opensuse.py + subnets = config.get('subnets', []) + config_routes = '' + has_default_route = False ++ seen_default_gateway = None + for subnet in subnets: + # Render the default gateway if it is present + gateway = subnet.get('gateway') @@ -42,6 +43,8 @@ Index: cloudinit/distros/opensuse.py + ['default', gateway, '-', '-\n'] + ) + has_default_route = True ++ if not seen_default_gateway: ++ seen_default_gateway = gateway + # Render subnet routes + routes = subnet.get('routes', []) + for route in routes: @@ -58,7 +61,11 @@ Index: cloudinit/distros/opensuse.py + 'Skipping route; has no prefix "%s"', dest + ) + continue -+ if dest == 'default' and has_default_route: ++ if ( ++ dest == 'default' and ++ has_default_route and ++ gateway == seen_default_gateway ++ ): + dest_info = dest + if gateway: + dest_info = ' '.join([dest, gateway, '-', '-']) diff --git a/cloud-init.changes b/cloud-init.changes index 074c3ea..1475b0d 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Nov 10 11:39:09 UTC 2020 - Robert Schweikert + +- Update cloud-init-write-routes.patch (bsc#1177526) + + Fix missing default route when dual stack network setup is used. Once + a default route was configured for Ipv6 or IPv4 the default route + configuration for the othre protocol was skipped. + ------------------------------------------------------------------- Sat Oct 17 10:25:30 UTC 2020 - Robert Schweikert