diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/res_init.c | 4 | ||||
-rw-r--r-- | lib/libc/net/res_query.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index 2fa3cbc..bf12280 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -56,7 +56,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; static char orig_rcsid[] = "From: Id: res_init.c,v 8.8 1997/06/01 20:34:37 vixie Exp"; -static char rcsid[] = "$Id: res_init.c,v 1.12 1997/02/22 15:00:32 peter Exp $"; +static char rcsid[] = "$Id: res_init.c,v 1.13 1997/06/27 08:22:03 peter Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -424,6 +424,8 @@ res_setoptions(options, source) #endif } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) { _res.options |= RES_USE_INET6; + } else if (!strncmp(cp, "no_tld_query", sizeof("no_tld_query") - 1)) { + _res.options |= RES_NOTLDQUERY; } else { /* XXX - print a warning here? */ } diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c index 8110895..3716e63 100644 --- a/lib/libc/net/res_query.c +++ b/lib/libc/net/res_query.c @@ -56,7 +56,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; static char orig_rcsid = "From: Id: res_query.c,v 8.10 1997/06/01 20:34:37 vixie Exp"; -static char rcsid[] = "$Id: res_query.c,v 1.13 1997/03/24 06:11:44 imp Exp $"; +static char rcsid[] = "$Id: res_query.c,v 1.14 1997/06/27 08:22:03 peter Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -281,9 +281,9 @@ res_search(name, class, type, answer, anslen) /* if we have not already tried the name "as is", do that now. * note that we do this regardless of how many dots were in the - * name or whether it ends with a dot. + * name or whether it ends with a dot unless NOTLDQUERY is set. */ - if (!tried_as_is) { + if (!tried_as_is && (dots || !(_res.options & RES_NOTLDQUERY))) { ret = res_querydomain(name, NULL, class, type, answer, anslen); if (ret > 0) return (ret); |