aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/netutils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/netutils.c b/plugins/netutils.c
index 926547e4..c567df53 100644
--- a/plugins/netutils.c
+++ b/plugins/netutils.c
@@ -256,6 +256,7 @@ my_connect (char *host_name, int port, int *sd, int proto)
memset (&hints, 0, sizeof (hints));
hints.ai_family = PF_UNSPEC;
hints.ai_protocol = proto;
+ hints.ai_socktype = (proto == IPPROTO_UDP) ? SOCK_DGRAM : SOCK_STREAM;
snprintf (port_str, sizeof (port_str), "%d", port);
result = getaddrinfo (host_name, port_str, &hints, &res);