mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
detect MTU for some known ipv6 tunnel brokers
This commit is contained in:
parent
14a6947b02
commit
014e4b0e1d
3 changed files with 24 additions and 3 deletions
|
@ -428,13 +428,13 @@ namespace i2p
|
|||
if (mtu)
|
||||
{
|
||||
LogPrint (eLogDebug, "Router: Our v6 MTU=", mtu);
|
||||
int maxMTU = address->IsSSU2 () ? 1500 : 1488; // must be multiple of 16 for SSU1
|
||||
int maxMTU = i2p::util::net::GetMaxMTU (host.to_v6 ());
|
||||
if (mtu > maxMTU)
|
||||
{
|
||||
mtu = maxMTU;
|
||||
LogPrint(eLogWarning, "Router: MTU dropped to upper limit of ", maxMTU, " bytes");
|
||||
}
|
||||
else if (mtu && !address->IsSSU2 ()) // SSU1
|
||||
if (mtu && !address->IsSSU2 ()) // SSU1
|
||||
mtu = (mtu >> 4) << 4; // round to multiple of 16
|
||||
if (address->ssu) address->ssu->mtu = mtu;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue