summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 912e086)
raw | patch | inline | side by side (parent: 912e086)
author | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | |
Fri, 27 Jun 2003 18:47:45 +0000 (18:47 +0000) | ||
committer | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | |
Fri, 27 Jun 2003 18:47:45 +0000 (18:47 +0000) |
RFC3493 as pointed out by Janos Mohacsi.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@562 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@562 f882894a-f735-0410-b71e-b25c423dba1c
plugins/netutils.c | patch | blob | history |
diff --git a/plugins/netutils.c b/plugins/netutils.c
index 926547e4ebe6387e8454fa8972a623944a340117..c567df534bf86b3d28eafcb5be34444259b7e464 100644 (file)
--- a/plugins/netutils.c
+++ b/plugins/netutils.c
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);