Hi,
>>>>> On Thu, 15 Aug 2013 16:14:51 +0200
>>>>> manu@... said:
> Jim Klimov <jimklimov@...> wrote:
>
> Addon to previous review: I do not quite see how this routine does
> NOT change the original string in addr in case of any lookup errors?
> Did I miss something (i.e. maybe getnameinfo() does not modify it
> upon failure - always on all platforms)?
manu> Good question. Anyone has an experience of that?
If NI_NAMEREQD is not specified, getnameinfo(3) copies a result on
success, and copies a numeric form of the node's address on fail.
AFAIK, if NI_NAMEREQD is specified, getnameinfo(3) on BSDs copies a
result only on success, and doesn't touch addr on fail. However, I'm
not sure if there is such implementation that changes addr on fail.
POSIX says only on success:
Upon successful completion, getnameinfo() shall return the node
and service names, if requested, in the buffers provided. The
returned names are always null-terminated strings.
Sincerely,
--
Hajimu UMEMOTO
ume@... ume@{,jp.}FreeBSD.org
http://www.mahoroba.org/~ume/Message
Re: [milter-greylist] Submitter DNS name resolution and forgery detection
2013-08-15 by Hajimu UMEMOTO
Attachments
- No local attachments were found for this message.