diff --git a/cloud-init-write-routes.patch b/cloud-init-write-routes.patch index 06d3f8e..348d606 100644 --- a/cloud-init-write-routes.patch +++ b/cloud-init-write-routes.patch @@ -1,6 +1,14 @@ --- cloudinit/distros/opensuse.py.orig +++ cloudinit/distros/opensuse.py -@@ -172,7 +172,48 @@ class Distro(distros.Distro): +@@ -11,6 +11,7 @@ + from cloudinit import distros + + from cloudinit.distros.parsers.hostname import HostnameConf ++from cloudinit.net.network_state import mask_to_net_prefix + + from cloudinit import helpers + from cloudinit import log as logging +@@ -172,7 +173,47 @@ class Distro(distros.Distro): util.write_file(out_fn, str(conf), 0o644) def _write_network_config(self, netconfig): @@ -29,20 +37,19 @@ + dest = route.get('network') + if dest in default_nets: + dest = 'default' -+ gateway = route.get('gateway') -+ config_routes += ' '.join([dest, gateway]) + if dest != 'default': -+ config_routes += ' ' + route.get('netmask', '') -+ else: -+ config_routes += ' -' -+ config_routes += ' -' -+ config_routes += '\n' ++ prefix = mask_to_net_prefix(route.get('netmask')) ++ dest += '/' + str(prefix) ++ gateway = route.get('gateway') ++ config_routes += ' '.join( ++ [dest, gateway, '-', '-\n'] ++ ) + if not config_routes: + dest = 'default' + gateway = subnet.get('gateway') + if gateway: + config_routes += ' '.join( -+ [dest, gateway, '-', '-', '\n'] ++ [dest, gateway, '-', '-\n'] + ) + if config_routes: + route_file = '/etc/sysconfig/network/ifroute-%s' % if_name diff --git a/cloud-init.changes b/cloud-init.changes index f288ee0..426d2d4 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Nov 6 14:43:54 UTC 2019 - Petr Pavlu + +- Update cloud-init-write-routes.patch (bsc#1155376) + + Write a route's destination network in CIDR notation instead of using the + netmask. This provides support for correctly recording IPv6 routes. + ------------------------------------------------------------------- Tue Oct 22 19:57:22 UTC 2019 - Robert Schweikert diff --git a/cloud-init.spec b/cloud-init.spec index 3595248..0078244 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -49,7 +49,7 @@ Patch50: cloud-init-noresolv-merge-no-dns-data.diff Patch51: cloud-init-after-wicked.patch # FIXME (lp#1849296) Patch52: cloud-init-break-resolv-symlink.patch -# FIXME (lp#1849378) +# FIXME (lp#1849378) expected in 19.3 Patch53: cloud-init-renderer-detect.patch BuildRequires: fdupes