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