Hi Alexander,
Wenzel, Alexander wrote,

> When trying to resolve a hostname by getaddrinfo() using some specific
> settings, it will always return -EAI_NONAME (Name or service not known).
> 
> To reproduce this behavior, you need to request an IPv6 address with the
> additional AF_V4MAPPED flag set from an non IPv6 capable hostname. If
> you choose a IPv4/IPv6 capable hostname like google.com, everything
> works fine.
> 
> This patch is more or less a port [1][2] from the glibc and their behavior
> for the AF_V4MAPPED flag. To test the bug you can use the following snippet.
> 
> ---- 8< ----
> 
> int ret;
> struct addrinfo* result;
> struct addrinfo hints;
> 
> memset(&hints, 0, sizeof(struct addrinfo));
> hints.ai_family = AF_INET6;
> hints.ai_flags = AI_V4MAPPED;
> 
> ret = getaddrinfo("test.com", NULL, &hints, &result);
> printf("getaddrinfo(): %i", ret);
> 
> ---- 8< ----
> 
> [1] 
> https://sourceware.org/git/?p=glibc.git;a=commit;f=sysdeps/posix/getaddrinfo.c;h=925c3c5c71596c02f7e58a0ffcdcaae44eb065c1
> [2] 
> https://sourceware.org/git/?p=glibc.git;a=commit;f=sysdeps/posix/getaddrinfo.c;h=28977c2c1acb789660ad47e0d88e42486059c916
> 
> Signed-off-by: Alexander Wenzel <[email protected]>
> ---
>  libc/inet/getaddrinfo.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)

Applied and pushed,
 thx
  Waldemar
_______________________________________________
devel mailing list
[email protected]
http://mailman.uclibc-ng.org/cgi-bin/mailman/listinfo/devel

Reply via email to