diff options
author | 2001-07-31 22:02:18 +0000 | |
---|---|---|
committer | 2001-07-31 22:02:18 +0000 | |
commit | a572a86e93a9aa7912214affd56d604bdf6c36f8 (patch) | |
tree | 308c1223525bb430794e97d0f41a099b2e7d1912 /lib/libc/net/res_query.c | |
parent | Don't include a NUL at the end of our CHAP SUCCESS packet. (diff) | |
download | wireguard-openbsd-a572a86e93a9aa7912214affd56d604bdf6c36f8.tar.xz wireguard-openbsd-a572a86e93a9aa7912214affd56d604bdf6c36f8.zip |
add support for EDNS0 extended flag DNSSEC OK (aka DO). ok deraadt@
Diffstat (limited to 'lib/libc/net/res_query.c')
-rw-r--r-- | lib/libc/net/res_query.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c index db76821fc69..3cf79283027 100644 --- a/lib/libc/net/res_query.c +++ b/lib/libc/net/res_query.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_query.c,v 1.15 2001/06/27 00:58:55 lebel Exp $ */ +/* $OpenBSD: res_query.c,v 1.16 2001/07/31 22:02:18 jakob Exp $ */ /* * ++Copyright++ 1988, 1993 @@ -60,7 +60,7 @@ static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$From: res_query.c,v 8.9 1996/09/22 00:13:28 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: res_query.c,v 1.15 2001/06/27 00:58:55 lebel Exp $"; +static char rcsid[] = "$OpenBSD: res_query.c,v 1.16 2001/07/31 22:02:18 jakob Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -123,8 +123,11 @@ res_query(name, class, type, answer, anslen) n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL, buf, sizeof(buf)); - if (n > 0 && (_res.options & RES_USE_EDNS0) != 0) + if (n > 0 && ((_res.options & RES_USE_EDNS0) || + (_res.options & RES_USE_DNSSEC))) { n = res_opt(n, buf, sizeof(buf), anslen); + } + if (n <= 0) { #ifdef DEBUG if (_res.options & RES_DEBUG) |