Bug 22272 - bind-utils programs give garbage output on reverse lookups
bind-utils programs give garbage output on reverse lookups
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: bind (Show other bugs)
1.0
i386 Linux
high Severity high
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Dale Lovelace
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-12-13 17:52 EST by Nalin Dahyabhai
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-12-15 07:17:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nalin Dahyabhai 2000-12-13 17:52:59 EST
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)
Comment 1 Bernhard Rosenkraenzer 2000-12-14 11:28:40 EST
Works perfectly with glibc 2.2-5; breaks with glibc 2.2-7 and 2.2-8.
Comment 2 Jakub Jelinek 2000-12-14 11:40:28 EST
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).
Comment 3 Bernhard Rosenkraenzer 2000-12-14 11:43:04 EST
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.
Comment 4 Jakub Jelinek 2000-12-14 11:49:37 EST
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
Comment 5 Bernhard Rosenkraenzer 2000-12-14 11:54:31 EST
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.
Comment 6 Jakub Jelinek 2000-12-15 06:58:32 EST
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).
Comment 7 Jakub Jelinek 2000-12-15 07:16:29 EST
--- 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).
Comment 8 Jakub Jelinek 2000-12-15 07:17:54 EST
Oops, forgot to mention, could you send the patch upstream?
Comment 9 Bernhard Rosenkraenzer 2000-12-19 14:27:28 EST
Fixed

Note You need to log in before you can comment on or make changes to this bug.