Bug 22272 - bind-utils programs give garbage output on reverse lookups
Summary: bind-utils programs give garbage output on reverse lookups
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: bind   
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
high
high
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Dale Lovelace
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-12-13 22:52 UTC by Nalin Dahyabhai
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Nalin Dahyabhai 2000-12-13 22:52:59 UTC
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 16:28:40 UTC
Works perfectly with glibc 2.2-5; breaks with glibc 2.2-7 and 2.2-8.

Comment 2 Jakub Jelinek 2000-12-14 16:40:28 UTC
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 16:43:04 UTC
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 16:49:37 UTC
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 16:54:31 UTC
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 11:58:32 UTC
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 12:16:29 UTC
--- 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 12:17:54 UTC
Oops, forgot to mention, could you send the patch upstream?

Comment 9 Bernhard Rosenkraenzer 2000-12-19 19:27:28 UTC
Fixed


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