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