In bind-utils-9.1.0-0.b1.1, both "host" and "nslookup" return garbage when told to do reverse lookups for addresses: nalin@blade:~> host 152.1.2.22 Host \132\147\028\@\020\127\028\@\128z\001\@\00722.2.1.152.in-addr.arpa. not found: 3(NXDOMAIN)
Works perfectly with glibc 2.2-5; breaks with glibc 2.2-7 and 2.2-8.
Uhm, are you sure about it? LD_LIBRARY_PATH=/usr/src/bs/BUILD/glibc-2.2/build-i686-linux/ /usr/src/bs/BUILD/glibc-2.2/build-i686-linux/elf/ld.so `which host` 152.1.2.22 22.2.1.152.IN-ADDR.ARPA domain name pointer uni04ns.unity.ncsu.edu [root@porky /]# host 152.1.2.22 22.2.1.152.IN-ADDR.ARPA domain name pointer uni04ns.unity.ncsu.edu [root@porky /]# rpm -q glibc glibc-2.2-5 (that /usr/src/bs/... points to glibc-2.2-8).
Yes. I was just about to close this bug as WORKSFORME after trying on 2.2-5; then updated glibc (glibc-2.2-8.i686.rpm - maybe you're using the i386 version? might be i686 specific), and it started displaying the results Nalin reported.
Strange: $ rpm -q glibc glibc-2.2-8 $ rpm -q --qf '%{ARCH}\n' glibc i686 $ host 152.1.2.22 22.2.1.152.IN-ADDR.ARPA domain name pointer uni04ns.unity.ncsu.edu
Are you using the bind-utils package from the current tree (9.1.0-0.b1.1)? Bind 9.1 has a complete rewrite of host, so if you're using an older version, chances are it won't trigger the same problem.
Ok, I've fetched bind-utils 9.1.0b1 and now can reproduce it with any glibc I've tried (2.1.94, 2.1.97, 2.2-5, 2.2-8).
--- bind-9.1.0b1/bin/dig/dighost.c.jj Tue Dec 5 21:18:30 2000 +++ bind-9.1.0b1/bin/dig/dighost.c Fri Dec 15 13:24:58 2000 @@ -212,6 +212,7 @@ get_reverse(char reverse[MXNAME], char * if (n == 0) { return (DNS_R_BADDOTTEDQUAD); } + reverse[0] = '\0'; for (i = n - 1; i >= 0; i--) { snprintf(working, MXNAME/8, "%d.", adrs[i]); (also can be found in ~jakub/bind-reverse-fix.patch).
Oops, forgot to mention, could you send the patch upstream?
Fixed