summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr/res_send_async.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2019-01-14 06:23:06 +0000
committerotto <otto@openbsd.org>2019-01-14 06:23:06 +0000
commit3d657e16d4d71195b8092bf2a9972efebcf11303 (patch)
tree27d82ec1c1579a414b4fcdd39f49d35d03234eca /lib/libc/asr/res_send_async.c
parentMake apply_ignore_list(), set_default_hostname(), (diff)
downloadwireguard-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/libc/asr/res_send_async.c')
-rw-r--r--lib/libc/asr/res_send_async.c4
1 files changed, 3 insertions, 1 deletions
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;