diff options
author | 2019-01-14 06:23:06 +0000 | |
---|---|---|
committer | 2019-01-14 06:23:06 +0000 | |
commit | 3d657e16d4d71195b8092bf2a9972efebcf11303 (patch) | |
tree | 27d82ec1c1579a414b4fcdd39f49d35d03234eca /lib | |
parent | Make apply_ignore_list(), set_default_hostname(), (diff) | |
download | wireguard-openbsd-3d657e16d4d71195b8092bf2a9972efebcf11303.tar.xz wireguard-openbsd-3d657e16d4d71195b8092bf2a9972efebcf11303.zip |
There are cases where a program doing dns requests wants to set the
Checking Disabled flag. Introduce a RES flag to do so. ok krw@
deraadt@ eric@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/asr/res_mkquery.c | 4 | ||||
-rw-r--r-- | lib/libc/asr/res_send_async.c | 4 | ||||
-rw-r--r-- | lib/libc/net/resolver.3 | 6 |
3 files changed, 10 insertions, 4 deletions
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 |