2 ms·
You gotta love how they decided to use colons as part of the notation! But, oops, that is also used for port number notations. Solution? Square brackets: [ff
by kazinator 3y ago
You gotta love how they decided to use colons as part of the notation! But, oops, that is also used for port number notations. Solution? Square brackets:
[ff00:abcd::0]:1234
- tomxor 3y agoYeah it's annoying, I've come across numerous address parsing bugs because of this. I think the reason they needed to use a different delimiter is because IPv6 addresses can also omit entire portions of zeros as a convenience feature to shorten addresses, which means there are a subset of shortened addresses that look exactly like IPv4 if not for the delimiter.
- kazinator 3y ago> I've come across numerous address parsing bugs because of this. To prevent that, you can write tons of test cases. IPv6 notation parsing and generating test cases are oodles of fun.