mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
check min MTU 1280
This commit is contained in:
parent
cf41df82e2
commit
cf27581c76
1 changed files with 1 additions and 0 deletions
|
@ -2196,6 +2196,7 @@ namespace transport
|
||||||
mtu = m_Address->ssu->mtu;
|
mtu = m_Address->ssu->mtu;
|
||||||
if (mtu)
|
if (mtu)
|
||||||
{
|
{
|
||||||
|
if (mtu < (int)SSU2_MIN_PACKET_SIZE) mtu = SSU2_MIN_PACKET_SIZE;
|
||||||
m_MaxPayloadSize = mtu - (addr->IsV6 () ? IPV6_HEADER_SIZE: IPV4_HEADER_SIZE) - UDP_HEADER_SIZE - 32;
|
m_MaxPayloadSize = mtu - (addr->IsV6 () ? IPV6_HEADER_SIZE: IPV4_HEADER_SIZE) - UDP_HEADER_SIZE - 32;
|
||||||
LogPrint (eLogDebug, "SSU2: Session MTU=", mtu, ", max payload size=", m_MaxPayloadSize);
|
LogPrint (eLogDebug, "SSU2: Session MTU=", mtu, ", max payload size=", m_MaxPayloadSize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue