|
|
|
|
|
by nemanjaboric
3017 days ago
|
|
> Luckily it's easy enough to support IPv6: just replace AF_INET by AF_INET6 and it will work with both IPv4 and IPv6! So don't you dare to ever use AF_INET anymore without a good excuse (emphasis mine) AFAIK, on many systems (think FreeBSD) this is not true: https://www.unix.com/man-page/FreeBSD/4/inet6/ > By default, FreeBSD does not route IPv4 traffic to AF_INET6 sockets. The default behavior intentionally violates RFC2553 for security reasons. Listen to two sockets if you want to accept both IPv4 and IPv6 traffic. IPv4 traffic may be routed with certain per-socket/per-node configuration, however, it is not recommended to do so. Consult ip6(4) for details. |
|