#include "utils.h"
#include "xalloc.h"
-bool hostnames = false;
-
/*
Turn a string into a struct addrinfo.
Return NULL on failure.
int err;
struct addrinfo hint = {
- .ai_family = addressfamily,
+ .ai_family = AF_UNSPEC,
.ai_socktype = socktype,
};
return str;
}
- err = getnameinfo(&sa->sa, SALEN(sa->sa), address, sizeof(address), port, sizeof(port),
- hostnames ? 0 : (NI_NUMERICHOST | NI_NUMERICSERV));
+ err = getnameinfo(&sa->sa, SALEN(sa->sa), address, sizeof(address), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV);
if(err) {
logger(NULL, MESHLINK_ERROR, "Error while looking up hostname: %s", err == EAI_SYSTEM ? strerror(errno) : gai_strerror(err));