|
|
|
@ -147,6 +147,18 @@ namespace i2p
@@ -147,6 +147,18 @@ namespace i2p
|
|
|
|
|
bool ygg; i2p::config::GetOption("meshnets.yggdrasil", ygg); |
|
|
|
|
boost::asio::ip::address_v6 yggaddr; |
|
|
|
|
if (ygg) |
|
|
|
|
{ |
|
|
|
|
std::string yggaddress; i2p::config::GetOption ("meshnets.yggaddress", yggaddress); |
|
|
|
|
if (!yggaddress.empty ()) |
|
|
|
|
{ |
|
|
|
|
yggaddr = boost::asio::ip::address_v6::from_string (yggaddress); |
|
|
|
|
if (yggaddr.is_unspecified () || i2p::util::net::GetMTU (yggaddr) != 0xFFFF) // ygg's MTU is always 65535
|
|
|
|
|
{ |
|
|
|
|
LogPrint(eLogWarning, "Daemon: Can't find Yggdrasil address ", yggaddress); |
|
|
|
|
ygg = false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
yggaddr = i2p::util::net::GetYggdrasilAddress (); |
|
|
|
|
if (yggaddr.is_unspecified ()) |
|
|
|
@ -155,6 +167,7 @@ namespace i2p
@@ -155,6 +167,7 @@ namespace i2p
|
|
|
|
|
ygg = false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uint16_t port; i2p::config::GetOption("port", port); |
|
|
|
|
if (!i2p::config::IsDefault("port")) |
|
|
|
|