Blame SOURCES/BZ_1748825_Enforce-IPv6-RA-and-DHCPv6-address-base-on-MAC.patch

245567
From f4a9b9bce8e59a59218275495993bb17e5d86da0 Mon Sep 17 00:00:00 2001
245567
From: Gris Ge <fge@redhat.com>
245567
Date: Thu, 5 Sep 2019 21:06:51 +0800
245567
Subject: [PATCH 2/2] nm/ipv6: Enforce IPv6-RA and DHCPv6 address base on MAC
245567
245567
When enslave interface to linux bridge, to ensure the bridge
245567
get the same IPv6 address from IPv6-RA and DHCPv6, change
245567
the 'dhcp_duid' to LL(Link-layer address, RFC 3315) and
245567
'addr_gen_mode' to EUI64.
245567
245567
Signed-off-by: Gris Ge <fge@redhat.com>
245567
---
245567
 libnmstate/nm/ipv6.py | 6 ++++++
245567
 1 file changed, 6 insertions(+)
245567
245567
diff --git a/libnmstate/nm/ipv6.py b/libnmstate/nm/ipv6.py
245567
index 92955ab..9d0bc9b 100644
245567
--- a/libnmstate/nm/ipv6.py
245567
+++ b/libnmstate/nm/ipv6.py
245567
@@ -112,6 +112,12 @@ def create_setting(config, base_con_profile):
245567
     if not setting_ip:
245567
         setting_ip = nmclient.NM.SettingIP6Config.new()
245567
 
245567
+    # Ensure IPv6 RA and DHCPv6 is based on MAC address only
245567
+    setting_ip.props.addr_gen_mode = (
245567
+        nmclient.NM.SettingIP6ConfigAddrGenMode.EUI64
245567
+    )
245567
+    setting_ip.props.dhcp_duid = 'll'
245567
+
245567
     if not config or not config.get(InterfaceIPv6.ENABLED):
245567
         setting_ip.props.method = nmclient.NM.SETTING_IP6_CONFIG_METHOD_IGNORE
245567
         return setting_ip
245567
-- 
245567
2.23.0
245567