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

Bug#503912: marked as done (libc6: getaddrinfo V4MAPPED behaviour is not according to standard and manpage)



Your message dated Tue, 4 Nov 2008 17:18:27 +0100
with message-id <20081104161827.GL2929@volta.aurel32.net>
and subject line Re: Bug#503912: libc6: getaddrinfo V4MAPPED behaviour is not according to standard and manpage
has caused the Debian Bug report #503912,
regarding libc6: getaddrinfo V4MAPPED behaviour is not according to standard and manpage
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
503912: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503912
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Version: 2.7-15
Severity: normal


Hello,

the getaddrinfo call with a hints set to AI_V4MAPPED should return
IPv4 mapped addresses if they are available.

hints.ai_family = AF_INET6;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = 0; /* Any protocol */
hints.ai_canonname = NULL;
hints.ai_addr = NULL;
hints.ai_next = NULL;
hints.ai_flags = AI_V4MAPPED;

However, this doesn't work. I only get the mapped V4 adresses when I do this:

hints.ai_flags = AI_V4MAPPED | AI_ALL;

However the AI_ALL flag has a different meaning.

If I compare this behaviour with opensolaris, there I DO get V4 mapped addresses with
only AI_V4MAPPED set in the hints.

Reading the manual page, and also the docs on opengroup.org, I would expect the following
behavior:

Only AI_V4MAPPED -> return IPv6 addresses only if available, if not available, return
    IPv4 mapped

AI_V4MAPPED | AI_ALL -> return IPv6 addresses and IPv4 mapped addresses.

Which is not what glibc does.

I'll see if I can come up with a patch somewhere in the next days.

Thanks, Joost Damad


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-5-s1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6 depends on:
ii  libgcc1                       1:4.3.2-1  GCC support library

libc6 recommends no packages.

Versions of packages libc6 suggests:
ii  glibc-doc                     2.7-15     GNU C Library: Documentation
ii  libc6-i686                    2.7-15     GNU C Library: Shared libraries [i
ii  locales-all [locales]         2.7-15     GNU C Library: Precompiled locale 

-- debconf information:
  glibc/upgrade: true
  glibc/restart-failed:
  glibc/restart-services:



--- End Message ---
--- Begin Message ---
Version: 2.8+20080809-3

On Wed, Oct 29, 2008 at 10:11:51AM +0100, Joost Yervante Damad wrote:
> Package: libc6
> Version: 2.7-15
> Severity: normal
> 
> 
> Hello,
> 
> the getaddrinfo call with a hints set to AI_V4MAPPED should return
> IPv4 mapped addresses if they are available.
> 
> hints.ai_family = AF_INET6;
> hints.ai_socktype = SOCK_STREAM;
> hints.ai_protocol = 0; /* Any protocol */
> hints.ai_canonname = NULL;
> hints.ai_addr = NULL;
> hints.ai_next = NULL;
> hints.ai_flags = AI_V4MAPPED;
> 
> However, this doesn't work. I only get the mapped V4 adresses when I do this:
> 
> hints.ai_flags = AI_V4MAPPED | AI_ALL;
> 
> However the AI_ALL flag has a different meaning.
> 
> If I compare this behaviour with opensolaris, there I DO get V4 mapped addresses with
> only AI_V4MAPPED set in the hints.
> 
> Reading the manual page, and also the docs on opengroup.org, I would expect the following
> behavior:
> 
> Only AI_V4MAPPED -> return IPv6 addresses only if available, if not available, return
>     IPv4 mapped
> 
> AI_V4MAPPED | AI_ALL -> return IPv6 addresses and IPv4 mapped addresses.
> 
> Which is not what glibc does.
> 
> I'll see if I can come up with a patch somewhere in the next days.
> 

The resolv library has been partly rewritten in glibc 2.8, and this bug
appeared to be fixed in this version.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net


--- End Message ---

Reply to: