arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh677316-legacy.patch

147e83
This patch restores the legacy resolv.conf option parsing behavior which
147e83
was removed during the rebase.  It also adds back formatting of legacy
147e83
options.
147e83
147e83
diff --git a/resolv/res_debug.c b/resolv/res_debug.c
147e83
index 919b86e2b37dc150..e175229913b5f644 100644
147e83
--- a/resolv/res_debug.c
147e83
+++ b/resolv/res_debug.c
147e83
@@ -597,7 +597,9 @@ p_option(u_long option) {
147e83
 	switch (option) {
147e83
 	case RES_INIT:		return "init";
147e83
 	case RES_DEBUG:		return "debug";
147e83
-	case RES_USEVC:		return "use-vc";
147e83
+	case RES_AAONLY:	return "aaonly(unimpl)";
147e83
+	case RES_USEVC:		return "usevc";
147e83
+	case RES_PRIMARY:	return "primry(unimpl)";
147e83
 	case RES_IGNTC:		return "igntc";
147e83
 	case RES_RECURSE:	return "recurs";
147e83
 	case RES_DEFNAMES:	return "defnam";
147e83
@@ -608,6 +610,11 @@ p_option(u_long option) {
147e83
 	case RES_NOALIASES:	return "noaliases";
147e83
 	case DEPRECATED_RES_USE_INET6:	return "inet6";
147e83
 	case RES_ROTATE:	return "rotate";
147e83
+	case RES_NOCHECKNAME:	return "no-check-names";
147e83
+	case RES_KEEPTSIG:	return "keeptsig(unimpl)";
147e83
+	case RES_BLAST:		return "blast";
147e83
+	case RES_USEBSTRING:	return "ip6-bytstring";
147e83
+	case RES_NOIP6DOTINT:   return "no-ip6-dotint";
147e83
 	case RES_USE_EDNS0:	return "edns0";
147e83
 	case RES_SNGLKUP:	return "single-request";
147e83
 	case RES_SNGLKUPREOP:	return "single-request-reopen";
147e83
diff --git a/resolv/res_init.c b/resolv/res_init.c
147e83
index 4e1f9fe8dea93e8a..c29bc4e9b99b6bee 100644
147e83
--- a/resolv/res_init.c
147e83
+++ b/resolv/res_init.c
147e83
@@ -668,7 +668,11 @@ res_setoptions (struct resolv_conf_parser *parser, const char *options)
147e83
           } options[] = {
147e83
 #define STRnLEN(str) str, sizeof (str) - 1
147e83
             { STRnLEN ("inet6"), 0, DEPRECATED_RES_USE_INET6 },
147e83
+            { STRnLEN ("ip6-bytestring"), 0, RES_USEBSTRING },
147e83
+            { STRnLEN ("no-ip6-dotint"), 0, RES_NOIP6DOTINT },
147e83
+            { STRnLEN ("ip6-dotint"), 1, ~RES_NOIP6DOTINT },
147e83
             { STRnLEN ("rotate"), 0, RES_ROTATE },
147e83
+            { STRnLEN ("no-check-names"), 0, RES_NOCHECKNAME },
147e83
             { STRnLEN ("edns0"), 0, RES_USE_EDNS0 },
147e83
             { STRnLEN ("single-request-reopen"), 0, RES_SNGLKUPREOP },
147e83
             { STRnLEN ("single-request"), 0, RES_SNGLKUP },
147e83
diff --git a/resolv/tst-resolv-res_init-skeleton.c b/resolv/tst-resolv-res_init-skeleton.c
147e83
index 3b7b4129e31eaa22..288c2466e573507c 100644
147e83
--- a/resolv/tst-resolv-res_init-skeleton.c
147e83
+++ b/resolv/tst-resolv-res_init-skeleton.c
147e83
@@ -106,7 +106,8 @@ print_resp (FILE *fp, res_state resp)
147e83
     /* Also mask out other default flags which cannot be set through
147e83
        the options directive.  */
147e83
     int options
147e83
-      = resp->options & ~(RES_INIT | RES_RECURSE | RES_DEFNAMES | RES_DNSRCH);
147e83
+      = resp->options & ~(RES_INIT | RES_RECURSE | RES_DEFNAMES | RES_DNSRCH
147e83
+                          | RES_NOIP6DOTINT);
147e83
     if (options != 0
147e83
         || resp->ndots != 1
147e83
         || resp->retrans != RES_TIMEOUT