Blob Blame History Raw
From 6aa521cd2a8d77aee3caafe3413090c683f13cb1 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Wed, 9 Sep 2015 12:59:01 +0200
Subject: [PATCH 1/1] core: fix handling ignore-auto-dns for IPv6 nameservers

https://bugzilla.redhat.com/show_bug.cgi?id=1261428

Fixes: f7a8962dd47099425438ee484e02f40e18b6ee79
(cherry picked from commit e0fe47b74e92e9614717a3d918eed3fc0bc6b2ea)
(cherry picked from commit 8de6ee4ebad93cd1f552c666183a4fac76274aa5)
---
 src/nm-ip6-config.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index 9647268..ef25623 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -635,8 +635,10 @@ nm_ip6_config_merge (NMIP6Config *dst, const NMIP6Config *src, NMIPConfigMergeFl
 		nm_ip6_config_add_address (dst, nm_ip6_config_get_address (src, i));
 
 	/* nameservers */
-	for (i = 0; i < nm_ip6_config_get_num_nameservers (src); i++)
-		nm_ip6_config_add_nameserver (dst, nm_ip6_config_get_nameserver (src, i));
+	if (!NM_FLAGS_HAS (merge_flags, NM_IP_CONFIG_MERGE_NO_DNS)) {
+		for (i = 0; i < nm_ip6_config_get_num_nameservers (src); i++)
+			nm_ip6_config_add_nameserver (dst, nm_ip6_config_get_nameserver (src, i));
+	}
 
 	/* default gateway */
 	if (nm_ip6_config_get_gateway (src))
-- 
2.4.3