summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/resolv.h3
-rw-r--r--lib/libc/asr/res_mkquery.c4
-rw-r--r--lib/libc/asr/res_send_async.c4
-rw-r--r--lib/libc/net/resolver.36
4 files changed, 12 insertions, 5 deletions
diff --git a/include/resolv.h b/include/resolv.h
index ba38c70968f..fb02483871e 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolv.h,v 1.21 2016/09/12 19:35:31 guenther Exp $ */
+/* $OpenBSD: resolv.h,v 1.22 2019/01/14 06:23:06 otto Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -190,6 +190,7 @@ struct __res_state_ext {
#define RES_USE_EDNS0 0x40000000 /* use EDNS0 */
/* DNSSEC extensions: use higher bit to avoid conflict with ISC use */
#define RES_USE_DNSSEC 0x20000000 /* use DNSSEC using OK bit in OPT */
+#define RES_USE_CD 0x10000000 /* set Checking Disabled flag */
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
diff --git a/lib/libc/asr/res_mkquery.c b/lib/libc/asr/res_mkquery.c
index d6800877279..658d09ba614 100644
--- a/lib/libc/asr/res_mkquery.c
+++ b/lib/libc/asr/res_mkquery.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_mkquery.c,v 1.11 2017/02/27 11:38:08 jca Exp $ */
+/* $OpenBSD: res_mkquery.c,v 1.12 2019/01/14 06:23:06 otto Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -60,6 +60,8 @@ res_mkquery(int op, const char *dname, int class, int type,
h.id = res_randomid();
if (ac->ac_options & RES_RECURSE)
h.flags |= RD_MASK;
+ if (ac->ac_options & RES_USE_CDFLAG)
+ h.flags |= CD_MASK;
h.qdcount = 1;
if (ac->ac_options & (RES_USE_EDNS0 | RES_USE_DNSSEC))
h.arcount = 1;
diff --git a/lib/libc/asr/res_send_async.c b/lib/libc/asr/res_send_async.c
index d0b4cb0e060..a03fe82318d 100644
--- a/lib/libc/asr/res_send_async.c
+++ b/lib/libc/asr/res_send_async.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_send_async.c,v 1.36 2017/03/15 15:54:41 deraadt Exp $ */
+/* $OpenBSD: res_send_async.c,v 1.37 2019/01/14 06:23:06 otto Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -376,6 +376,8 @@ setup_query(struct asr_query *as, const char *name, const char *dom,
h.id = res_randomid();
if (as->as_ctx->ac_options & RES_RECURSE)
h.flags |= RD_MASK;
+ if (as->as_ctx->ac_options & RES_USE_CDFLAG)
+ h.flags |= CD_MASK;
h.qdcount = 1;
if (as->as_ctx->ac_options & (RES_USE_EDNS0 | RES_USE_DNSSEC))
h.arcount = 1;
diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3
index e371f7851c3..e6b1f472b48 100644
--- a/lib/libc/net/resolver.3
+++ b/lib/libc/net/resolver.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: resolver.3,v 1.37 2017/02/27 11:38:08 jca Exp $
+.\" $OpenBSD: resolver.3,v 1.38 2019/01/14 06:23:06 otto Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: February 27 2017 $
+.Dd $Mdocdate: January 14 2019 $
.Dt RES_INIT 3
.Os
.Sh NAME
@@ -199,6 +199,8 @@ uses 4096 bytes as input buffer size.
Request that the resolver uses
Domain Name System Security Extensions (DNSSEC),
as defined in RFCs 4033, 4034, and 4035.
+.It Dv RES_USE_CD
+Set the Checking Disabled flag on queries.
.El
.Pp
The