mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 04:37:50 +02:00
use ipv6 preference only when netinet headers not used (entware with musl workaround)'
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
751da92c13
commit
1326597226
2 changed files with 5 additions and 5 deletions
|
@ -15,7 +15,7 @@
|
|||
#include "util.h"
|
||||
#include "SSU.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && !defined(_NETINET_IN_H)
|
||||
#include <linux/in6.h>
|
||||
#endif
|
||||
|
||||
|
@ -68,7 +68,7 @@ namespace transport
|
|||
m_SocketV6.set_option (boost::asio::ip::v6_only (true));
|
||||
m_SocketV6.set_option (boost::asio::socket_base::receive_buffer_size (SSU_SOCKET_RECEIVE_BUFFER_SIZE));
|
||||
m_SocketV6.set_option (boost::asio::socket_base::send_buffer_size (SSU_SOCKET_SEND_BUFFER_SIZE));
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && !defined(_NETINET_IN_H)
|
||||
if (m_EndpointV6.address() == boost::asio::ip::address().from_string("::")) // only if not binded to address
|
||||
{
|
||||
// Set preference to use public IPv6 address -- tested on linux, not works on windows, and not tested on others
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue