From 8b3bb53b4fad5f0face35c005e78f5ca69c5e599 Mon Sep 17 00:00:00 2001 From: naddy Date: Tue, 10 Aug 2004 15:13:08 +0000 Subject: The return value of getaddrinfo(3) was only checked for negative values but on FreeBSD it can also return positive values to indicate a problem. PR: 70242 Submitted by: Meno Abels --- net/sixxs-heartbeatd/Makefile | 2 +- .../files/patch-client_heartbeat-hb.c | 23 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 net/sixxs-heartbeatd/files/patch-client_heartbeat-hb.c (limited to 'net/sixxs-heartbeatd') diff --git a/net/sixxs-heartbeatd/Makefile b/net/sixxs-heartbeatd/Makefile index 1a9beb8aba44..0a3c6d0288ec 100644 --- a/net/sixxs-heartbeatd/Makefile +++ b/net/sixxs-heartbeatd/Makefile @@ -7,7 +7,7 @@ PORTNAME= sixxs-heartbeatd PORTVERSION= 20031026 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net ipv6 MASTER_SITES= http://www.sixxs.net/archive/sixxs/heartbeat/unix/ DISTNAME= heartbeat-unix-2003-10-26 diff --git a/net/sixxs-heartbeatd/files/patch-client_heartbeat-hb.c b/net/sixxs-heartbeatd/files/patch-client_heartbeat-hb.c new file mode 100644 index 000000000000..3dc64906179c --- /dev/null +++ b/net/sixxs-heartbeatd/files/patch-client_heartbeat-hb.c @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- client/hb.c.orig Tue Aug 10 08:10:03 2004 ++++ client/hb.c Tue Aug 10 08:09:11 2004 +@@ -91,7 +91,7 @@ + hints.ai_socktype = SOCK_DGRAM; + + // Get the POP IPv4 into a sockaddr +- if (getaddrinfo(sIPv4POP, PORT, &hints, &res) < 0) ++ if (getaddrinfo(sIPv4POP, PORT, &hints, &res) != 0) + { + hblog(LOG_ERR, "Couldn't resolve POP ip %s\n", sIPv4POP); + close(sockfd); +@@ -147,7 +147,7 @@ + hints.ai_socktype = SOCK_DGRAM; + + // Get the POP IPv4 into a sockaddr +- if (getaddrinfo(sIPv4LocalResolve, NULL, &hints, &res) < 0) ++ if (getaddrinfo(sIPv4LocalResolve, NULL, &hints, &res) != 0) + { + hblog(LOG_ERR, "Couldn't resolve POP ip %s\n", sIPv4POP); + // We return a -1, thus the app will keep beating -- cgit