memset(&hints, 0 , sizeof(hints));
hints.ai_family = AF_UNSPEC;
/* hints.ai_socktype = SOCK_DGRAM; */
- hints.ai_flags |= AI_CANONNAME;
hints.ai_flags |= AI_PASSIVE;
hostname = config_get_server_address();
service = config_get_server_port();
+ if (hostname != NULL)
+ hints.ai_flags |= AI_CANONNAME;
+
error = getaddrinfo(hostname, service, &hints, result);
if (error) {
pr_err("Could not infer a bindable address out of address '%s' and port '%s': %s",