diff options
author | ume <ume@FreeBSD.org> | 2001-06-10 20:25:24 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-06-10 20:25:24 +0000 |
commit | 32dc912febbf3960c47a0ebfd387977b2c78656b (patch) | |
tree | 262ae419994b75015819bd1f21a102e4d30832d2 /lib/libc/net/res_query.c | |
parent | 28fc250493cc9938edeed93280f363eeba7bcd2f (diff) | |
download | FreeBSD-src-32dc912febbf3960c47a0ebfd387977b2c78656b.zip FreeBSD-src-32dc912febbf3960c47a0ebfd387977b2c78656b.tar.gz |
Implement EDNS0 support, as EDNS0 support will be made mandatory for
IPv6 transport-ready resolvers/DNS servers. Need careful configuration
when enable it. (default config is not affected).
See manpage for details.
XXX visible symbol __res_opt() is added, however, it is not supposed to be
called from outside, libc minor is not bumped.
Obtained from: KAME/NetBSD
Diffstat (limited to 'lib/libc/net/res_query.c')
-rw-r--r-- | lib/libc/net/res_query.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c index 0ee2ad2..8a94a42 100644 --- a/lib/libc/net/res_query.c +++ b/lib/libc/net/res_query.c @@ -129,6 +129,8 @@ 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) + n = res_opt(n, buf, sizeof(buf), anslen); if (n <= 0) { #ifdef DEBUG if (_res.options & RES_DEBUG) |