Bug#666651: Bug#667737: libnet-server-perl: no IPv4 server when binding to localhost

Per Carlson pelle at hemmop.com
Wed May 2 22:25:57 UTC 2012


Hi Daniel.

A bit late maybe, but...

> At its core, there's a concern here that asking a server to bind to a
> name might actually bind it to multiple addresses (since a name can have
> multiple addresses).  I'm not convinced that Net::Server can be properly
> made to bind to multiple addresses with a single "host" configuration,
> but i agree that for the sake of congruity with the rest of the perl
> world, Net::Server should preferentially bind to the IPv4 address if a
> given name maps to both an IPv4 and an IPv6 address.

I don't agree with you (and "the rest of the perl world") here on a
general basis. getaddrinfo returns any IPv6 addresses before IPv4 *by
design*. If it were the other way around the (inevitable) transition
to IPv6 would be much harder. Of course this is only true if asking
for AF_UNSPEC (or the trivial AF_INET6) records.

In that light rewriting Net::Server to always prioritize IPv4 is dead
wrong and should be avoided. If selecting an IPv6 address is causing
any problems, this is most likely caused by old IPv4-only mindset
(like localhost always and only resolves to 127.0.0.1). If "we" are
going to have success in the v4->v6 transition this mindset must be
changed instead of breaking IPv6.

I do support your rewrite to 5.14 core modules for "native" IPv6
functionality, but not this "do not break any (already broken) IPv4
applications".

-- 
Pelle

"D’ä e å, vett ja”, skrek ja, för ja ble rasen,
”å i åa ä e ö, hörer han lite, d’ä e å, å i åa ä e ö"
- Gustav Fröding, 1895





More information about the pkg-perl-maintainers mailing list