diff options
Diffstat (limited to 'src/server/shared/Networking')
| -rw-r--r-- | src/server/shared/Networking/AsyncAcceptor.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/shared/Networking/AsyncAcceptor.h b/src/server/shared/Networking/AsyncAcceptor.h index 7f1cb34204c..95e25e02166 100644 --- a/src/server/shared/Networking/AsyncAcceptor.h +++ b/src/server/shared/Networking/AsyncAcceptor.h @@ -22,6 +22,7 @@ #include "IpAddress.h" #include "Log.h" #include <boost/asio/ip/tcp.hpp> +#include <boost/asio/ip/v6_only.hpp> #include <atomic> #include <functional> @@ -88,6 +89,11 @@ public: } #endif + // v6_only is enabled on some *BSD distributions by default + // we want to allow both v4 and v6 connections to the same listener + if (_endpoint.protocol() == boost::asio::ip::tcp::v6()) + _acceptor.set_option(boost::asio::ip::v6_only(false)); + _acceptor.bind(_endpoint, errorCode); if (errorCode) { |
