Blame SOURCES/0006-sysconfig-Don-t-write-BOOTPROTO-dhcp-for-ipv6-dhcp.patch

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