diff --git a/libi2pd/NTCP2.cpp b/libi2pd/NTCP2.cpp index d1a64e1b..fd92b7a2 100644 --- a/libi2pd/NTCP2.cpp +++ b/libi2pd/NTCP2.cpp @@ -985,7 +985,7 @@ namespace transport return; } auto size = bufbe16toh (buf->data () + 1); - if (size + 3 > buf->size () || size > i2p::data::MAX_RI_BUFFER_SIZE + 1) + if (size + 3 > (int)buf->size () || size > i2p::data::MAX_RI_BUFFER_SIZE + 1) { LogPrint (eLogError, "NTCP2: Unexpected RouterInfo size ", size, " in SessionConfirmed"); boost::asio::post (m_Server.GetService (), std::bind (&NTCP2Session::Terminate, shared_from_this ())); @@ -1784,10 +1784,6 @@ namespace transport } else if (address->IsV6() && (context.SupportsV6 () || context.SupportsMesh ())) { -#if defined(__HAIKU__) - LogPrint (eLogInfo, "NTCP2: Can't listen v6 TCP port ", address->port, ". IPV6_V6ONLY is not supported"); - continue; // IPV6_V6ONLY is not supported. Don't listen ipv6 -#endif m_NTCP2V6Acceptor.reset (new boost::asio::ip::tcp::acceptor (GetService ())); try { diff --git a/libi2pd/SSU2.cpp b/libi2pd/SSU2.cpp index 0b8eee6c..4f6f7bee 100644 --- a/libi2pd/SSU2.cpp +++ b/libi2pd/SSU2.cpp @@ -289,14 +289,7 @@ namespace transport socket.close (); socket.open (localEndpoint.protocol ()); if (localEndpoint.address ().is_v6 ()) -#if !defined(__HAIKU__) socket.set_option (boost::asio::ip::v6_only (true)); -#else - { - LogPrint (eLogWarning, "SSU2: Socket option IPV6_V6ONLY is not supported"); - m_IsForcedFirewalled6 = true; // IPV6_V6ONLY is not supported, always Firewalled for ipv6 - } -#endif uint64_t bufferSize = i2p::context.GetBandwidthLimit() * 1024 / 5; // max lag = 200ms bufferSize = std::max(SSU2_SOCKET_MIN_BUFFER_SIZE, std::min(bufferSize, SSU2_SOCKET_MAX_BUFFER_SIZE));