diff --git a/src/utils/os.c b/src/utils/os.c
index d8f707418b9cadb57040ef20473e6ee7d9b1de7d..4afc466683138aed81667a446638698bbe96da91 100644 (file)
--- a/src/utils/os.c
+++ b/src/utils/os.c
ai_hints.ai_family = AF_INET6;
else
ai_hints.ai_family = AF_UNSPEC;
+
if ((network & SDB_NET_IP) == SDB_NET_IP) {
ai_hints.ai_socktype = 0;
ai_hints.ai_protocol = 0;
}
else if (network & SDB_NET_UDP) {
ai_hints.ai_socktype = SOCK_DGRAM;
- ai_hints.ai_socktype = IPPROTO_UDP;
+ ai_hints.ai_protocol = IPPROTO_UDP;
}
status = getaddrinfo(host, port, &ai_hints, res);