News for hackers. Stuff that matters.
Re:Potholes to avoid when migrating to IPv6 by nly on Monday December 31, 2018 @11:26AM (#18795257)
Even putting aside the ambiguity of using ':' as a address:port delimiter, there are differences between platforms in parsing just IPv6 addresses

e.g. on Linux/glibc 2.28

    [cling]$ #include <arpa/inet.h>
    [cling]$ ::in6_addr dst;
    [cling]$ dst
    (::in6_addr &) @0x7ff318aff010
    [cling]$ inet_pton (AF_INET6, "1234:1234:1234:1234:1234::1234:8.8.8.8", &dst)
    (int) 0
    [cling]$ inet_pton (AF_INET6, "1234:1234:1234:1234:1234:1234:8.8.8.8", &dst)
    (int) 1
Here '::' in this 'full' address is (correctly) rejected.

However, although I haven't verified this on FreeBSD (perhaps someone can?), there's a comment in the libc source suggesting that this will be accepted there

https://github.com/freebsd/freebsd/blob/1d6e4247415d264485ee...

Parsing sucks.

There are no comments on this comment yet.