diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2017-06-28 16:29:18 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-07-20 16:47:12 -0400 |
commit | 811ce49d74afb158b2626a201ef5c714d5c9b059 (patch) | |
tree | 15cede33ff4ca1fe99fc029864cb1e567029b01f /cloudinit/net/eni.py | |
parent | 353c6902fb94899d410eb2f8bcc0bb81916e0e9e (diff) | |
download | vyos-cloud-init-811ce49d74afb158b2626a201ef5c714d5c9b059.tar.gz vyos-cloud-init-811ce49d74afb158b2626a201ef5c714d5c9b059.zip |
net: eni route rendering missed ipv6 default route config
In some network configurations a network value of '::' and a
netmask value of '::' were used to indicate a default IPV6 gateway.
Commit d00da2d5 removed ipv6 'netmask' attributes and calculate
a prefix length value instead. The eni route rendering failed to update
the check to use prefix value of 0 to indicate the presence of an IPV6
default route.
A broken ipv6 default route rendered like:
post-up route add -net :: netmask :: gw 2001:4800:78ff:1b::1 || true
And with this patch, it now renders like:
post-up route add -A inet6 default gw 2001:4800:78ff:1b::1 || true
LP: #1701097
Diffstat (limited to 'cloudinit/net/eni.py')
-rw-r--r-- | cloudinit/net/eni.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py index b707146c..bb80ec02 100644 --- a/cloudinit/net/eni.py +++ b/cloudinit/net/eni.py @@ -355,7 +355,7 @@ class Renderer(renderer.Renderer): default_gw = " default gw %s" % route['gateway'] content.append(up + default_gw + or_true) content.append(down + default_gw + or_true) - elif route['network'] == '::' and route['netmask'] == 0: + elif route['network'] == '::' and route['prefix'] == 0: # ipv6! default_gw = " -A inet6 default gw %s" % route['gateway'] content.append(up + default_gw + or_true) |