On 2014-11-24 10:10, Rocco Caputo via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=100499 >
>
> I'm not sure why getnameinfo() is in there, specifically. There
> seems to be a few changes that add/remove it over time. I assume
> while it's not very performant, it exists in the code to cover some
> not entirely obvious condition or portability issue.
>
> While I can certainly revert it again, it's probably best to have a
> clear reason why. Otherwise it will just get changed back when the
> next person runs into a problem... and so on.
I don't really understand that problem. Even if you use NI_NUMERICHOST |
NI_NUMERICSERV with getnameinfo(), it still returns address as
human-readable string, while docs mention it should always return
address binary format. I think changing that address format would be
quite impossible. Imagine the cursing...
Though, I cursed as well... because in place of binary address of ip,
there was hostname!
No idea if getnameinfo() really returned that binary address somewhere
sometime many decades ago or so, I have no idea why would anybody want
to have wrong data there. There must be real reason. I wonder if
automatic compatibility check can be created there, but it just seems
like wrong random data to me. That's usually bug.
Show quoted text> If you could send this as two separate patches, one to fix each
> feature, I can apply the uncontroversial one without waiting for
> getnameinfo() to be [takes off sunglasses] resolved.
Ok, if you really wish, here's separate microscopic patch for fixing
addr <-> port issue. And one for getnameinfo().
http://ketas.si.pri.ee/POE-Wheel-SocketFactory-inet6-swapped-port-addr.1416825472.diff
http://ketas.si.pri.ee/POE-Wheel-SocketFactory-getnameinfo.1416826409.diff