bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is the address parser?


From: Jan Rekorajski
Subject: Re: Where is the address parser?
Date: Sat, 3 Mar 2001 21:16:06 +0100
User-agent: Mutt/1.2.5i

I added bug-glibc to CC, looks like glibc 2.2 resolver is broken.

On Sat, 03 Mar 2001, Andre' Breiler wrote:

> Hi Jan,
> 
> I write you via private mail in the hope that we can figure out this
> quickly.
> 
> > This is weird. I just compiled the CVS source and it still accepts
> 
> So we use the same source version of iptables.
> 
> > 10.1.2.3.4. I tried compiling with gcc 2.95.3.test4 and egcs 1.1.2 -
> > same result :(
> 
> I'm useing plain SuSE7.0 with modutils update.
> So my gcc last version known als stable:
> address@hidden:~ > gcc -v
> Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
> gcc version 2.95.2 19991024 (release)

address@hidden baggins]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i586-pld-linux/2.95.3/specs
gcc version 2.95.3 20010219 (prerelease)

> Have you tried a "ping 10.1.2.3.4" to make sure that the resolver doesn't
> resolve this name to an ip.

It look like resolver bug, which version of (g)libc do you have?
It's gethostbyname that makes 10.1.2.7 from 10.1.2.3.4.

address@hidden baggins]$ rpm -q glibc
glibc-2.2.2-1

address@hidden baggins]$ ping 10.1.2.3.4
PING 10.1.2.3.4 (10.1.2.7): 56 data bytes

--- 10.1.2.3.4 ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss

Try this simple program:

#include <stdio.h>
#include <string.h>
#include <netdb.h>

int main(int argc,char *argv[])
{
        char *s = "10.1.2.3.40";
        struct hostent *h;

        h = gethostbyname(s);
        if (h)
                printf("This shouldn't happen\n");
}

Jan
-- 
Jan Rękorajski            |  ALL SUSPECTS ARE GUILTY. PERIOD!
baggins<at>mimuw.edu.pl   |  OTHERWISE THEY WOULDN'T BE SUSPECTS, WOULD THEY?
BOFH, MANIAC              |                   -- TROOPS by Kevin Rubio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]