summaryrefslogtreecommitdiffstats
path: root/lib/libc/asr/res_mkquery.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_mkquery.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_mkquery.c')
-rw-r--r--lib/libc/asr/res_mkquery.c4
1 files changed, 3 insertions, 1 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;