summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/net/res_init.c8
-rw-r--r--src/lib/libc/net/res_send.c7
2 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/libc/net/res_init.c b/src/lib/libc/net/res_init.c
index d21eed4a87..c74e0339ba 100644
--- a/src/lib/libc/net/res_init.c
+++ b/src/lib/libc/net/res_init.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_init.c,v 1.23 2001/06/30 00:50:21 itojun Exp $ */ 1/* $OpenBSD: res_init.c,v 1.24 2001/09/14 23:49:29 itojun Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1989, 1993 4 * ++Copyright++ 1985, 1989, 1993
@@ -64,7 +64,7 @@
64static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; 64static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
65static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; 65static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $";
66#else 66#else
67static char rcsid[] = "$OpenBSD: res_init.c,v 1.23 2001/06/30 00:50:21 itojun Exp $"; 67static char rcsid[] = "$OpenBSD: res_init.c,v 1.24 2001/09/14 23:49:29 itojun Exp $";
68#endif 68#endif
69#endif /* LIBC_SCCS and not lint */ 69#endif /* LIBC_SCCS and not lint */
70 70
@@ -607,6 +607,10 @@ res_setoptions(options, source)
607#endif 607#endif
608 } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) { 608 } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
609 _res.options |= RES_USE_INET6; 609 _res.options |= RES_USE_INET6;
610 } else if (!strncmp(cp, "insecure1", sizeof("insecure1") - 1)) {
611 _res.options |= RES_INSECURE1;
612 } else if (!strncmp(cp, "insecure2", sizeof("insecure2") - 1)) {
613 _res.options |= RES_INSECURE2;
610 } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) { 614 } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
611 _res.options |= RES_USE_EDNS0; 615 _res.options |= RES_USE_EDNS0;
612 } else { 616 } else {
diff --git a/src/lib/libc/net/res_send.c b/src/lib/libc/net/res_send.c
index d0f17af8ed..ab50559de6 100644
--- a/src/lib/libc/net/res_send.c
+++ b/src/lib/libc/net/res_send.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_send.c,v 1.9 2000/06/22 07:31:18 itojun Exp $ */ 1/* $OpenBSD: res_send.c,v 1.10 2001/09/14 23:49:29 itojun Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1989, 1993 4 * ++Copyright++ 1985, 1989, 1993
@@ -64,7 +64,7 @@
64static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; 64static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
65static char rcsid[] = "$From: res_send.c,v 8.12 1996/10/08 04:51:06 vixie Exp $"; 65static char rcsid[] = "$From: res_send.c,v 8.12 1996/10/08 04:51:06 vixie Exp $";
66#else 66#else
67static char rcsid[] = "$OpenBSD: res_send.c,v 1.9 2000/06/22 07:31:18 itojun Exp $"; 67static char rcsid[] = "$OpenBSD: res_send.c,v 1.10 2001/09/14 23:49:29 itojun Exp $";
68#endif 68#endif
69#endif /* LIBC_SCCS and not lint */ 69#endif /* LIBC_SCCS and not lint */
70 70
@@ -625,7 +625,8 @@ read_len:
625 * as we wish to receive answers from the first 625 * as we wish to receive answers from the first
626 * server to respond. 626 * server to respond.
627 */ 627 */
628 if (_res.nscount == 1 || (try == 0 && ns == 0)) { 628 if (!(_res.options & RES_INSECURE1) &&
629 (_res.nscount == 1 || (try == 0 && ns == 0))) {
629 /* 630 /*
630 * Connect only if we are sure we won't 631 * Connect only if we are sure we won't
631 * receive a response from another server. 632 * receive a response from another server.