From 3f2cc579e7627f45a77f835ba2f402e1b5c600b5 Mon Sep 17 00:00:00 2001 From: Kyle Walker Date: Thu, 8 Nov 2018 13:11:18 -0500 Subject: 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 --- src/dns/nm-dns-manager.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/dns/nm-dns-manager.c') 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); -- cgit v1.2.1