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/getaddrinfo.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/getaddrinfo.c')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index c54b252..8ff92c2 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -79,7 +79,6 @@ * - other KAME platforms already nuked FAITH ($GAI), but as FreeBSD * 4.0-RELEASE supplies it, we still have the code here. * - AI_ADDRCONFIG support is supplied - * - EDNS0 support is not available due to resolver differences * - some of FreeBSD style (#define tabify and others) * - classful IPv4 numeric (127.1) is allowed. */ @@ -101,6 +100,9 @@ #include <unistd.h> #include <stdio.h> #include <errno.h> +#ifdef DEBUG +#include <syslog.h> +#endif #include <syslog.h> #include <stdarg.h> @@ -1718,6 +1720,8 @@ res_queryN(name, target) 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) |