summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-09-01 01:19:23 +0000
committerbrian <brian@FreeBSD.org>1997-09-01 01:19:23 +0000
commita059b2e7c8fc7680bc0536c45c891db372aa7e32 (patch)
treed04cc8b3e1e1d95d201ec6bedb292ff524a3c19c /lib/libc/net
parentaf20ce1c06566c0e60c95f36bd9cc61626eae1f3 (diff)
downloadFreeBSD-src-a059b2e7c8fc7680bc0536c45c891db372aa7e32.zip
FreeBSD-src-a059b2e7c8fc7680bc0536c45c891db372aa7e32.tar.gz
Add "options no_tld_query" to resolv.conf.
Mention the capability in resolver(5). Mention that RES_OPTIONS can be used in resolver(5). Discussed with: -hackers
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/res_init.c4
-rw-r--r--lib/libc/net/res_query.c6
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);
OpenPOWER on IntegriCloud