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