Public bug reported:
This small snippet of code returns "gethostbyname: Unknown server error"
when called under 14.04 and 16.04:
-----8<--------
#include <stdio.h>
#include <netdb.h>
int main(int argc, char *argv[])
{
struct hostent *lh =
gethostbyname("_http._tcp.nova.clouds.archive.ubuntu.com");
if (lh)
puts(lh->h_name);
else
herror("gethostbyname");
}
-----8<--------
While I have a feeling this hostname is not valid, that's what apt is
trying to resolve after SRV query fails. The same code seems to be
working in 16.10.
** Affects: glibc (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1674479
Title:
gethostbyname: Unknown server error when resolving hostnames with
underscore
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1674479/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs