]> git.proxmox.com Git - qemu-server.git/commitdiff
fix #1959: add fallback for 'auto' previously set by SLAAC
authorDavid Limbeck <d.limbeck@proxmox.com>
Thu, 25 Oct 2018 09:32:45 +0000 (11:32 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 13 Nov 2018 09:10:29 +0000 (10:10 +0100)
SLAAC previously set 'auto' which is not supported by nocloud network
config. On an up-to-date Ubuntu this should work as it uses 'dhcp' for
both dhcp and SLAAC. For others it was invalid anyway.

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
PVE/QemuServer/Cloudinit.pm

index 53f1de9b2428719121a35e4e4e12c17cf3709642..5be820c22d58b0cc0014e7dab6412f8d2db9132d 100644 (file)
@@ -340,6 +340,9 @@ sub nocloud_network {
        if (defined(my $ip = $ipconfig->{ip6})) {
            if ($ip eq 'dhcp') {
                $content .= "${i}- type: dhcp6\n";
+           } elsif ($ip eq 'auto') {
+               # SLAAC is not supported by cloud-init, this fallback should work with an up-to-date netplan at least
+               $content .= "${i}- type: dhcp6\n";
            } else {
                $content .= "${i}- type: static\n"
                       . "${i}  address: $ip\n";