summaryrefslogtreecommitdiff
path: root/src/nm-ip6-config.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-03-09 18:43:53 +0100
committerThomas Haller <thaller@redhat.com>2018-03-20 21:02:52 +0100
commit454195c09db12413c7feab4cf29e67ec5c1cd528 (patch)
tree8c8e216b702595151a9d719cf4560b5aa1d2d308 /src/nm-ip6-config.c
parent453f9e5140481819d851c97f179c3c36142cf295 (diff)
downloadNetworkManager-454195c09db12413c7feab4cf29e67ec5c1cd528.tar.gz
device: don't capture resolve.conf for initial device config
This was called by via ... - manager:recheck_assume_connection() - manager:get_existing_connection() - nm_device_capture_initial_config() - update_ext_ip_config(initial=TRUE) and would parse resolv.conf, and try to fill the device IP config with nameservers and dns-options. But why? It would only have effect if NM was started with nm_dns_manager_get_resolv_conf_explicit(), but is that really sensible? And it would only take effect on devices that have a default route. And for what is this information even used? Let's not do it this way. If we need this information for assuming or external sys-iface mode, then it should be explicitly loaded at the appropriate moment. For now, drop it and see what breaks. Then we can fix it properly. If it even matters.
Diffstat (limited to 'src/nm-ip6-config.c')
-rw-r--r--src/nm-ip6-config.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index 5700f5e64e..c76da9951e 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -376,14 +376,13 @@ nm_ip6_config_clone (const NMIP6Config *self)
}
NMIP6Config *
-nm_ip6_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int ifindex, gboolean capture_resolv_conf, NMSettingIP6ConfigPrivacy use_temporary)
+nm_ip6_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int ifindex, NMSettingIP6ConfigPrivacy use_temporary)
{
NMIP6Config *self;
NMIP6ConfigPrivate *priv;
const NMDedupMultiHeadEntry *head_entry;
NMDedupMultiIter iter;
const NMPObject *plobj = NULL;
- gboolean has_addresses = FALSE;
nm_assert (ifindex > 0);
@@ -409,7 +408,6 @@ nm_ip6_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int i
NULL,
NULL))
nm_assert_not_reached ();
- has_addresses = TRUE;
}
head_entry = nm_ip6_config_lookup_addresses (self);
nm_assert (head_entry);
@@ -426,23 +424,6 @@ nm_ip6_config_capture (NMDedupMultiIndex *multi_idx, NMPlatform *platform, int i
nmp_cache_iter_for_each (&iter, head_entry, &plobj)
_add_route (self, plobj, NULL, NULL);
- /* If the interface has the default route, and has IPv6 addresses, capture
- * nameservers from /etc/resolv.conf.
- */
- if ( has_addresses
- && priv->best_default_route
- && capture_resolv_conf) {
- gs_free char *rc_contents = NULL;
-
- if (g_file_get_contents (_PATH_RESCONF, &rc_contents, NULL, NULL)) {
- if (nm_utils_resolve_conf_parse (AF_INET6,
- rc_contents,
- priv->nameservers,
- priv->dns_options))
- _notify (self, PROP_NAMESERVERS);
- }
- }
-
return self;
}