diff options
Diffstat (limited to 'lib/libc/asr/res_mkquery.c')
-rw-r--r-- | lib/libc/asr/res_mkquery.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/asr/res_mkquery.c b/lib/libc/asr/res_mkquery.c index 3b169c13194..340c1f11f74 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.9 2015/09/09 15:49:34 deraadt Exp $ */ +/* $OpenBSD: res_mkquery.c,v 1.10 2017/02/18 19:23:05 jca Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -61,10 +61,14 @@ res_mkquery(int op, const char *dname, int class, int type, if (ac->ac_options & RES_RECURSE) h.flags |= RD_MASK; h.qdcount = 1; + if (ac->ac_options & RES_USE_EDNS0) + h.arcount = 1; _asr_pack_init(&p, buf, buflen); _asr_pack_header(&p, &h); _asr_pack_query(&p, type, class, dn); + if (ac->ac_options & RES_USE_EDNS0) + _asr_pack_edns0(&p, MAXPACKETSZ); _asr_ctx_unref(ac); |