Bug 22272 - bind-utils programs give garbage output on reverse lookups
Summary: bind-utils programs give garbage output on reverse lookups
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: bind   
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Dale Lovelace
Depends On:
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:
Last Closed: 2000-12-15 12:17:58 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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
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` domain name pointer uni04ns.unity.ncsu.edu
[root@porky /]# host domain name pointer uni04ns.unity.ncsu.edu
[root@porky /]# rpm -q glibc
(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
$ rpm -q glibc
$ rpm -q --qf '%{ARCH}\n' glibc
$ host 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.",
(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

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