gethostbyname: Unknown server error when resolving hostnames with underscore
Bug #1674479 reported by
Krzysztof Klimonda
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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(
if (lh)
else
}
-----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.
To post a comment you must log in.