This is the mail archive of the libc-help@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]

Re: Domains aliased to a pool of IP addresses doesn't get resolved


> 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


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