--- cloudinit/net/eni.py.orig +++ cloudinit/net/eni.py @@ -338,6 +338,7 @@ class Renderer(renderer.Renderer): up = indent + "post-up route add" down = indent + "pre-down route del" or_true = " || true" + gateway = indent + "gateway " mapping = { 'network': '-net', 'netmask': 'netmask', @@ -346,6 +347,7 @@ class Renderer(renderer.Renderer): } if route['network'] == '0.0.0.0' and route['netmask'] == '0.0.0.0': default_gw = " default gw %s" % route['gateway'] + content.append(gateway + route['gateway']) content.append(up + default_gw + or_true) content.append(down + default_gw + or_true) elif route['network'] == '::' and route['netmask'] == 0: