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