summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Walker <kwalker@redhat.com>2018-11-08 13:11:18 -0500
committerThomas Haller <thaller@redhat.com>2018-11-12 11:56:47 +0100
commit3f2cc579e7627f45a77f835ba2f402e1b5c600b5 (patch)
tree1896cc56dd3b4cae48dfee7d9e282c93cc5c8a00
parent49c11a44e4e901752a81e3942efca64448fa7c53 (diff)
downloadNetworkManager-3f2cc579e7627f45a77f835ba2f402e1b5c600b5.tar.gz
dns: remove the resolv.conf 6 entry limit
The resolv.conf used to have a limit of 6 entries for the search option. With later versions of glibc, this limit has been removed. As a result, remove the limit here so that all search entries set will be applied to the resolv.conf. If there is a limit imposed by older versions of glibc, it should be imposed there as opposed to within NetworkManager. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/80 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/47
-rw-r--r--src/dns/nm-dns-manager.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c
index 7542228f54..8575237742 100644
--- a/src/dns/nm-dns-manager.c
+++ b/src/dns/nm-dns-manager.c
@@ -1100,7 +1100,6 @@ _collect_resolv_conf_data (NMDnsManager *self,
const char **out_nis_domain)
{
NMDnsManagerPrivate *priv;
- guint i, num, len;
NMResolvConfData rc = {
.nameservers = g_ptr_array_new (),
.searches = g_ptr_array_new (),
@@ -1170,17 +1169,6 @@ _collect_resolv_conf_data (NMDnsManager *self,
}
}
- /* Per 'man resolv.conf', the search list is limited to 6 domains
- * totalling 256 characters.
- */
- num = MIN (rc.searches->len, 6u);
- for (i = 0, len = 0; i < num; i++) {
- len += strlen (rc.searches->pdata[i]) + 1; /* +1 for spaces */
- if (len > 256)
- break;
- }
- g_ptr_array_set_size (rc.searches, i);
-
*out_searches = _ptrarray_to_strv (rc.searches);
*out_options = _ptrarray_to_strv (rc.options);
*out_nameservers = _ptrarray_to_strv (rc.nameservers);