summaryrefslogtreecommitdiff
path: root/lib/libc/net/res_send.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-09-14 23:49:30 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-09-14 23:49:30 +0000
commit2e0878732588689c24c4ec5e7801a5e2e0a31e4d (patch)
tree3982dd74c120a945d238f9420856771ad284a289 /lib/libc/net/res_send.c
parent18493070473e0598fa6b4d98fd5e798862b0af60 (diff)
add "options insecure[12]" support for /etc/resolv.conf.
insecure1 is necessary for IPv6 dynamic DNS server discovery, draft-ietf-ipngwg-dns-discovery-02.txt. sync with kame. ok'ed by angelos
Diffstat (limited to 'lib/libc/net/res_send.c')
-rw-r--r--lib/libc/net/res_send.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c
index d0f17af8ed9..ab50559de6e 100644
--- a/lib/libc/net/res_send.c
+++ b/lib/libc/net/res_send.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_send.c,v 1.9 2000/06/22 07:31:18 itojun Exp $ */
+/* $OpenBSD: res_send.c,v 1.10 2001/09/14 23:49:29 itojun Exp $ */
/*
* ++Copyright++ 1985, 1989, 1993
@@ -64,7 +64,7 @@
static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$From: res_send.c,v 8.12 1996/10/08 04:51:06 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_send.c,v 1.9 2000/06/22 07:31:18 itojun Exp $";
+static char rcsid[] = "$OpenBSD: res_send.c,v 1.10 2001/09/14 23:49:29 itojun Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -625,7 +625,8 @@ read_len:
* as we wish to receive answers from the first
* server to respond.
*/
- if (_res.nscount == 1 || (try == 0 && ns == 0)) {
+ if (!(_res.options & RES_INSECURE1) &&
+ (_res.nscount == 1 || (try == 0 && ns == 0))) {
/*
* Connect only if we are sure we won't
* receive a response from another server.