Hi,

On Tue, Oct 06, 2015 at 05:34:07PM +0200, Mildis wrote:
> Hi Willy,
> 
> My bad : in the doc, I didn???t get the « add a colon without a port to 
> end an address » trick.
> That???s why I was lost at first.
> The doc obviously says ???<address>[:[port]]??? making the port optional 
> and an ending colon valid but it looks like a typo to me as ending an IPv6 
> address with a colon is not one of my habit.
> 
> The provided patch sent initially should handle square brackets but 
> still makes the colon mandatory even with no port.
> I???ll rework it so it accepts :
> - 2001:db8::1234: as IPv6 no port (for backward compatibility)
> - [2001:db8::1234] as IPv6 no port
> - [2001:db8::1234]:80 as IPv6 with port
> but forbid ???[2001:db8::1234]:??? and ???2001:db8::1234???

You must not forbid "[2001:db8::1234]:" otherwise people will not adopt
the square brackets notation. Some of them probably already do things like
this :

      server srv1 $IP_SRV1:$PORT_SRV1

And fill the respective environment variables with either IPv4 or IPv6.
By preventing a clearly non-ambigous config from being parsed, you'll
simply make them stay away from this new syntax, which is the opposite
to what you're seeking.

And regarding "2001:db8::1234", you can't forbit it simply because you
don't know if 1234 is a port or not in this context, as you have reported.

Otherwise it's OK for me. Don't forget to update the doc accordingly!

Willy


Reply via email to