summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-06-28 01:30:07 +0000
committerUlrich Drepper <drepper@redhat.com>2004-06-28 01:30:07 +0000
commit340ef046a6b7e10b112e387f453bc78348c04745 (patch)
tree33d7ae6c8a8d964395145a8cb55d5a11772cfb1a
parentf2481c319d604a9d797df6147ec6d3010861e4a4 (diff)
downloadglibc-340ef046a6b7e10b112e387f453bc78348c04745.tar.gz
Update.
2004-06-27 Ulrich Drepper <drepper@redhat.com> * resolv/resolv.h (RES_NOIP6DOTINT): Define. * resolv/res_init.c (res_setoptions): Handle no-ip6-dotint option. * resolv/gethnamaddr.c (gethostbyaddr): Don't lookup with .ip6.int if RES_NOIP6DOTINT flag is set. * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise.
-rw-r--r--ChangeLog8
-rw-r--r--resolv/gethnamaddr.c2
-rw-r--r--resolv/nss_dns/dns-host.c2
-rw-r--r--resolv/res_init.c3
-rw-r--r--resolv/resolv.h2
5 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fa648cac44..49256a91f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-06-27 Ulrich Drepper <drepper@redhat.com>
+
+ * resolv/resolv.h (RES_NOIP6DOTINT): Define.
+ * resolv/res_init.c (res_setoptions): Handle no-ip6-dotint option.
+ * resolv/gethnamaddr.c (gethostbyaddr): Don't lookup with .ip6.int
+ if RES_NOIP6DOTINT flag is set.
+ * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise.
+
2004-06-25 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/fcntl.c: Move to...
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c
index 2172375867..c93ca51c88 100644
--- a/resolv/gethnamaddr.c
+++ b/resolv/gethnamaddr.c
@@ -720,7 +720,7 @@ gethostbyaddr(addr, len, af)
n = __libc_res_nquery(&_res, qbuf, C_IN, T_PTR, buf.buf->buf, 1024,
&buf.ptr);
- if (n < 0 && af == AF_INET6) {
+ if (n < 0 && af == AF_INET6 && (_res.options & RES_NOIP6DOTINT) == 0) {
strcpy(qp, "ip6.int");
n = __libc_res_nquery(&_res, qbuf, C_IN, T_PTR, buf.buf->buf,
buf.buf != orig_buf ? MAXPACKET : 1024,
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index ab6cc792b8..0424cb9e2a 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -337,7 +337,7 @@ _nss_dns_gethostbyaddr_r (const void *addr, socklen_t len, int af,
n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf,
1024, &host_buffer.ptr);
- if (n < 0 && af == AF_INET6)
+ if (n < 0 && af == AF_INET6 && (_res.options & RES_NOIP6DOTINT) == 0)
{
strcpy (qp, "ip6.int");
n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf,
diff --git a/resolv/res_init.c b/resolv/res_init.c
index cbab7cada5..d0559c3821 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -492,6 +492,9 @@ res_setoptions(res_state statp, const char *options, const char *source) {
} else if (!strncmp(cp, "ip6-bytestring",
sizeof("ip6-bytestring") - 1)) {
statp->options |= RES_USEBSTRING;
+ } else if (!strncmp(cp, "no-ip6-dotint",
+ sizeof("no-ip6-dotint") - 1)) {
+ statp->options |= RES_NOIP6DOTINT;
} else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) {
statp->options |= RES_ROTATE;
} else if (!strncmp(cp, "no-check-names",
diff --git a/resolv/resolv.h b/resolv/resolv.h
index 8d37d420e0..010d7dd897 100644
--- a/resolv/resolv.h
+++ b/resolv/resolv.h
@@ -201,6 +201,8 @@ struct res_sym {
#define RES_BLAST 0x00020000 /* blast all recursive servers */
#define RES_USEBSTRING 0x00040000 /* IPv6 reverse lookup with byte
strings */
+#define RES_NOIP6DOTINT 0x00080000 /* Do not use .ip6.int in IPv6
+ reverse lookup */
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)