From 928518481bf8963f25ffe3b7a48c87864a5d7331 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Thu, 31 May 2018 20:00:32 +0200 Subject: sysconfig: Don't write BOOTPROTO=dhcp for ipv6 dhcp Don't write BOOTPROTO=dhcp for ipv6 dhcp, as BOOTPROTO applies only to ipv4. Explicitly write IPV6_AUTOCONF=no for dhcp on ipv6. X-downstream-only: yes Resolves: rhbz#1519271 Signed-off-by: Ryan McCabe --- cloudinit/net/sysconfig.py | 1 + tests/unittests/test_net.py | 1 + 2 files changed, 2 insertions(+) diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py index ae0554e..ec166cf 100644 --- a/cloudinit/net/sysconfig.py +++ b/cloudinit/net/sysconfig.py @@ -310,6 +310,7 @@ class Renderer(renderer.Renderer): if subnet_type == 'dhcp6': iface_cfg['IPV6INIT'] = True iface_cfg['DHCPV6C'] = True + iface_cfg['IPV6_AUTOCONF'] = False elif subnet_type in ['dhcp4', 'dhcp']: iface_cfg['BOOTPROTO'] = 'dhcp' elif subnet_type == 'static': diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py index 5f1aa3e..8bcafe0 100644 --- a/tests/unittests/test_net.py +++ b/tests/unittests/test_net.py @@ -886,6 +886,7 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true BOOTPROTO=none DEVICE=bond0 DHCPV6C=yes + IPV6_AUTOCONF=no IPV6INIT=yes MACADDR=aa:bb:cc:dd:ee:ff ONBOOT=yes -- 1.8.3.1