On some system(s), getaddrinfo() may take extra cycles when we use "0" for the second argument. We probably may use NULL instead if the first argument is non-NULL. (This problem is originally reported by John Devitofranceschi <jdvf@optonline.net>.)
Created attachment 622 [details] eliminate use of getaddrinfo(host, "0", &hints, &res) where getaddrinfo(host, NULL, &hints, &res) is appricable
I think the patch is correct, but I'm not sure if there was a reason for it being changed. The CVS entry for the change was: - markus@cvs.openbsd.org 2003/06/02 09:17:34 deprecate VerifyReverseMapping since it's dangerous if combined with IP based access control as noted by Mike Harding; replace with a UseDNS option, UseDNS is on by default and includes the VerifyReverseMapping check; with itojun@, provos@, jakob@ and deraadt@ ok deraadt@, djm@ Also, this issue is mentioned in bug #689, but it's not exactly the same issue so I'm keeping them as separate bugs for now.
Unfortunately this won't be changed in 4.0.
Apparently the reason for the "0" was to make sure that at least one of (host, port) was a non-null value. I have verified that it is not possible for the host parameters to be NULL in these cases.
A modified version of your patch has been applied and will be in the next release. Thanks.
Mass update RESOLVED->CLOSED after release of openssh-5.1