]> git.pond.sub.org Git - empserver/commit
Fix wildcard bind to at least bind IPv4 or else IPv6 on OpenBSD
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 7 Apr 2013 17:30:17 +0000 (19:30 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 8 May 2013 04:57:56 +0000 (06:57 +0200)
commitda154ffd0699fb414a5b8387f4900e515dc6531f
tree7db7de568003e1d3453e79eabc14abeda02b8b7f
parent36578f463ecac00e6a109a7784b0038ab10ad939
Fix wildcard bind to at least bind IPv4 or else IPv6 on OpenBSD

OpenBSD refuses to implement IPV6_V6ONLY, in violation of RFC 3493.
RFC 4038 frowningly recognizes this practice.  The only way to bind
both IPv4 and IPv4 there is two separate sockets.  Requires more
surgery than I can do now.

Since we can't have both IPv6 and IPv6 on OpenBSD with our single
socket, prefer IPv4, but if that doesn't work, do IPv6.

To prefer IPv6 instead, put 'listen_addr "::"' into econfig.  Document
that in listen_addr's doc string.
include/econfig-spec.h
src/lib/gen/tcp_listen.c