This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/5479] gethostbyname() fails on IPv6 numeric addresses


------- Additional Comments From aurelien at aurel32 dot net  2008-04-07 18:40 -------
Please consider the following testcase:

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

int main()
{
   if( gethostbyname( "127.0.0.1" ) == NULL )
      printf( "error: %d\n", (int)h_errno );
   else
      printf( "found\n" );

   if( gethostbyname( "::1" ) == NULL )
      printf( "error: %d\n", (int)h_errno );
   else
      printf( "found\n" );
}

Numeric IPv4 addresses are left unchanged. That's not the case for IPv6 
addresses.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


http://sourceware.org/bugzilla/show_bug.cgi?id=5479

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]