Hi,
>>>>> On Tue, 21 Apr 2009 15:36:56 +0000 (UTC)
>>>>> Wesley Shields <[email protected]> said:
wxs> Modified files:
wxs> security/nmap Makefile Z
wxs> Added files:
wxs> security/nmap/files patch-ncat__ncat_core.c
wxs> Log:
wxs> - Add patch to work around versions of FreeBSD with broken
wxs> getaddrinfo(3) (7.1 and earlier, and -CURRENT before the end of March
wxs> 2009).
wxs>
wxs> PR: ports/133779
wxs> Submitted by: Daniel Roethlisberger <[email protected]> (maintainer)
It seems this change is not good practice. The original usage of
getadrinfo(3) is not good, in the first place.
You can fix this by just adding ai_socktype hint. The replacement of
patch-ncat__ncat_core.c is attached.
Sorry, but I don't test it, actually. But, it should work. Please,
try it.
Sincerely,
Index: ncat/ncat_core.c
diff -u -p ncat/ncat_core.c.orig ncat/ncat_core.c
--- ncat/ncat_core.c.orig 2009-04-02 11:57:42.000000000 +0900
+++ ncat/ncat_core.c 2009-04-22 00:58:48.839927966 +0900
@@ -89,6 +89,7 @@ int resolve(char *hostname, unsigned sho
memset(&hints, 0, sizeof(hints));
hints.ai_family = o.af;
+ hints.ai_socktype = SOCK_DGRAM;
if (o.nodns)
hints.ai_flags |= AI_NUMERICHOST;
--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
[email protected] u...@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[email protected]"