c1c26e
From 471353b3c3bf5cba5cab4d1b203b1c259c709fde Mon Sep 17 00:00:00 2001
c1c26e
From: Miroslav Rezanina <mrezanin@redhat.com>
c1c26e
Date: Thu, 31 May 2018 20:00:32 +0200
c1c26e
Subject: sysconfig: Don't write BOOTPROTO=dhcp for ipv6 dhcp
c1c26e
c1c26e
Don't write BOOTPROTO=dhcp for ipv6 dhcp, as BOOTPROTO applies
c1c26e
only to ipv4. Explicitly write IPV6_AUTOCONF=no for dhcp on ipv6.
c1c26e
c1c26e
X-downstream-only: yes
c1c26e
c1c26e
Resolves: rhbz#1519271
c1c26e
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
c1c26e
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
c1c26e
---
c1c26e
 cloudinit/net/sysconfig.py  | 1 +
c1c26e
 tests/unittests/test_net.py | 1 +
c1c26e
 2 files changed, 2 insertions(+)
c1c26e
c1c26e
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
c1c26e
index ae0554ef..ec166cf1 100644
c1c26e
--- a/cloudinit/net/sysconfig.py
c1c26e
+++ b/cloudinit/net/sysconfig.py
c1c26e
@@ -310,6 +310,7 @@ class Renderer(renderer.Renderer):
c1c26e
             if subnet_type == 'dhcp6':
c1c26e
                 iface_cfg['IPV6INIT'] = True
c1c26e
                 iface_cfg['DHCPV6C'] = True
c1c26e
+                iface_cfg['IPV6_AUTOCONF'] = False
c1c26e
             elif subnet_type in ['dhcp4', 'dhcp']:
c1c26e
                 iface_cfg['BOOTPROTO'] = 'dhcp'
c1c26e
             elif subnet_type == 'static':
c1c26e
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
c1c26e
index 5f1aa3e7..8bcafe08 100644
c1c26e
--- a/tests/unittests/test_net.py
c1c26e
+++ b/tests/unittests/test_net.py
c1c26e
@@ -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
c1c26e
                 BOOTPROTO=none
c1c26e
                 DEVICE=bond0
c1c26e
                 DHCPV6C=yes
c1c26e
+                IPV6_AUTOCONF=no
c1c26e
                 IPV6INIT=yes
c1c26e
                 MACADDR=aa:bb:cc:dd:ee:ff
c1c26e
                 ONBOOT=yes
c1c26e
-- 
c1c26e
2.20.1
c1c26e