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