kopia lustrzana https://github.com/markqvist/reticulum
link: Fix MDU calculation size for Links
We need to substract the HEADER_MAXSIZE instead of MINSIZE to correctly calculate the MDU of a Link. In order to avoid similar mistakes in the future and not duplicate this calculation, we can reuse Reticulum.MDU instead.pull/424/head
rodzic
a5783da407
commit
25fa16ed93
|
@ -61,7 +61,7 @@ class Link:
|
|||
ECPUBSIZE = 32+32
|
||||
KEYSIZE = 32
|
||||
|
||||
MDU = math.floor((RNS.Reticulum.MTU-RNS.Reticulum.IFAC_MIN_SIZE-RNS.Reticulum.HEADER_MINSIZE-RNS.Identity.FERNET_OVERHEAD)/RNS.Identity.AES128_BLOCKSIZE)*RNS.Identity.AES128_BLOCKSIZE - 1
|
||||
MDU = math.floor((RNS.Reticulum.MDU-RNS.Identity.FERNET_OVERHEAD)/RNS.Identity.AES128_BLOCKSIZE)*RNS.Identity.AES128_BLOCKSIZE - 1
|
||||
|
||||
ESTABLISHMENT_TIMEOUT_PER_HOP = RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT
|
||||
"""
|
||||
|
|
Ładowanie…
Reference in New Issue