Regular Expression for IPv6 addresses

Valdis.Kletnieks at Valdis.Kletnieks at
Tue Feb 9 22:25:28 UTC 2010

On Wed, 10 Feb 2010 09:12:11 +1100, Mark Andrews said:
> In message <alpine.DEB.1.10.1002091548170.25663 at>, Thomas
>  Habets writes:
> > On Fri, 5 Feb 2010, Mark Andrews wrote:
> > > And now for the trick question.  Is ::ffff: a legal
> > > mapped address and if it, does it match
> > 
> > Forget IPv6. The first question is does match 
> > in IPv4?
> I think you meant "does match in IPv4".

No, he had it right, because...

> > The answer is a long one full of different answers depending on 
> > who's doing the parsing (gethostbyname(), inet_aton(), 
> > inet_net_pton(), etc..) and on what OS. And also on many bugs.
> Indeed.  It's a minefield out there for application developers that
> want consistancy.  Even when you develop your own some OS vendor will
> go and stuff it up on you.

There's no guarantee that 2 different binaries on the same box will resolve to the same 32-bit sequence, so it's in fact possible that
it's not even equal to itself, much less
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <>

More information about the NANOG mailing list