evsocket::canIPv6 once
This commit is contained in:
+1
-1
@@ -387,7 +387,7 @@ ServIface::ServIface(const SockAddr &addr, server::Server::Pvt *server, bool fal
|
||||
auto orig_port = bind_addr.port();
|
||||
|
||||
#ifdef __linux__
|
||||
if(server->canIPv6 && bind_addr.family()==AF_INET && bind_addr.isAny()) {
|
||||
if(evsocket::canIPv6 && bind_addr.family()==AF_INET && bind_addr.isAny()) {
|
||||
// Linux IP stack disallows binding both 0.0.0.0 and [::] for the same port.
|
||||
// so promote to IPv6 when possible
|
||||
bind_addr = SockAddr::any(AF_INET6, bind_addr.port());
|
||||
|
||||
Reference in New Issue
Block a user