Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Net::Server is finally getting releases again after a lot of backlogged work. Among other new features, it now has fully configurable IPv6 support. If you pass it an IPv4 address, you'll get an IPv4 socket. If you pass it an IPv6 address, you'll get an IPv6 socket. At the moment, if you pass a hostname the server defaults to IPv4 - but you can configure it to do just IPv6 by passing ipv => 6 (or ipv => "IPv6"), or you can have it look for any available interfaces on either IPv4 or IPv6 by passing ipv => "*", and if you wanted to force both you could pass ipv => "46" (or ipv => "IPv4 IPv6". A similar issue exists for the "*" host (0.0.0.0 under IPv4 and :: under IPv6).

So at the moment, the default for the ipv parameter is 4. Should it be? Or should the default be "*".

Using IPv6 as the default is certainly nice if that is what you want. However, it does bring along some problems. It is additional chaining and resources; If you do find interfaces for both then you need to create multiple sockets (well :: on linux listens for both IPv6 and IPv4 by default - so only one socket is needed there); there is a bit of legacy security issue involved in that servers running off of hostnames, that previously weren't listening to IPv6 sockets, now would automatically begin listening; additionally existing allow_deny rules may not handle the new peeraddr formats coming in; and finally, any legacy socket specific code might break (hopefully there isn't too much of this).

One more item, the unofficial 0.99.6.1 package essentially had ipv => "*" as the default for 9 months, so that is certainly something in favor of "*".

So what do the monks think the default should be? It is likely that "*" is the way to go along with careful documentation saying to add ipv => 4 to your configurations if you don't want to begin binding IPv6 after your upgrade.

Thanks for any input.

<strikethrough> Update: So, based on comments, I am deciding to leave the default as is (IPv4) - however, to try and make things easier, the value can now be set via the hostname ("localhost/IPv*"), via the proto ("tcp/IPv*") or via setting $ENV{'IPV'} to '*'.

I do still agree that from angles, not defaulting to "*" is partially broken. However, I think safety for existing people is likely better at this point. And it should be remembered that many configuration systems of other software require you to use the IP address.

Update2: After all of the debate, and after my last comment, we still went with a change. Version 2.005 switched the default to IPv*.

my @a=qw(random brilliant braindead); print $a[rand(@a)];

In reply to What should be default for Net::Server - IPv4, IPv6 or IPv* by Rhandom

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-25 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found