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.
This commit is contained in:
parent
36578f463e
commit
da154ffd06
2 changed files with 34 additions and 3 deletions
|
@ -84,7 +84,11 @@ EMPCF_COMMENT("# Set this to your source tree's src/lib/global to run the server
|
|||
"# without installing it, else leave it alone.")
|
||||
EMPCFBOTH("listen_addr", listen_addr, char *, NSC_STRING, KM_INTERNAL,
|
||||
"Local IP address the server should listen on")
|
||||
EMPCF_COMMENT("# \"\" listens on all, localhost just on the loopback interface.")
|
||||
EMPCF_COMMENT("# \"\" listens on all, localhost just on the loopback interface.\n"
|
||||
"# OpenBSD restriction: when the system has both IPv4 and IPv6\n"
|
||||
"# addresses configured, \"\" listens on all IPv4 addresses, and \"::\"\n"
|
||||
"# on all IPv6 addresses. There is no way to listen both on all IPv4\n"
|
||||
"# and on all IPv6 interfaces.")
|
||||
EMPCFBOTH("port", loginport, char *, NSC_STRING, KM_INTERNAL,
|
||||
"TCP port the server will bind")
|
||||
EMPCFBOTH("keep_journal", keep_journal, int, NSC_INT, KM_INTERNAL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue