This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Domains aliased to a pool of IP addresses doesn't get resolved
- From: Yuri Kanivetsky <yuri dot kanivetsky at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-help at sourceware dot org
- Date: Sat, 17 Oct 2015 01:23:17 +0300
- Subject: Re: Domains aliased to a pool of IP addresses doesn't get resolved
- Authentication-results: sourceware.org; auth=none
- References: <CAMhVC3YY6X+=_dhRbHkw+=m_exfD0yva1mLP78dq8wy47wT3tg at mail dot gmail dot com> <561B9C19 dot 2000906 at redhat dot com> <CAMhVC3bm7K7MXn-BsEPHq+SpVDyxrV5CJgbAVnfcC5nr7bYoqA at mail dot gmail dot com> <561F840B dot 2060802 at redhat dot com> <CAMhVC3ajOFhdA21F12mrLOgeJDtHx+DxzAixDF2OAEz6TSGz5g at mail dot gmail dot com> <5620194C dot 3090200 at redhat dot com> <CAMhVC3bKfeRmOSdKP3mz4Yu9NcyiLjwyz5ebWjibVka-UsY+3g at mail dot gmail dot com> <5620F6C4 dot 5090208 at redhat dot com>
> But the resolver refuses the TCP connection. This is a resolver bug,
> not a glibc bug, and even if we address the issue below, name resolution
> would still fail.
Can you explain what exactly is resolver. Or rather what is it part
of? The man page says: "The resolver is a set of routines in the C
library that..." Doesn't this mean it's part of glibc?
> I will try to reproduce this locally and file a bug if necessary.
Let me describe how to reproduce the issue. Install vagrant and
virtualbox, run `vagrant init` in an empty dir, change in just created
Vagrantfile file config.vm.box to ubuntu/vivid64. Then run `vagrant up
&& vagrant ssh`, and now you're in just created and started VM. After
that, create the test program file (quoting it here):
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
int main(void) {
int r;
struct addrinfo hints, *res;
memset(&hints, 0, sizeof (hints));
hints.ai_socktype = SOCK_STREAM;
r = getaddrinfo("keys.gnupg.net", "11371", &hints, &res);
// r = getaddrinfo("pool.sks-keyservers.net", "11371", &hints, &res);
if (r) {
printf("r: %hhi\n", r); // EAI_AGAIN
printf("r: %s\n", gai_strerror(r));
}
return 0;
}
Compile it and run:
./a.out; i=0; while true; do echo "--- $i"; gpg --delete-key
--batch --yes D39DC0E3; gpg --keyserver hkp://keys.gnupg.net
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 || { ./a.out;
echo -e $? '\a'; break; }; sleep 5; : $(( i++ )); done
Also, let me know if you have filed a bug report, please. I'd like to
follow the issue. And feel free to ask me if I may be of help.
Regards,
Yuri