5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-23 12:15:39 +00:00

Fix bug where MTU was ignored by sessions, resulting in default 1280

This commit is contained in:
Neil Alexander 2019-05-29 19:11:12 +01:00
parent 6b6266bfdd
commit 3b6c726a3c
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -283,7 +283,9 @@ func (ss *sessions) createSession(theirPermKey *crypto.BoxPubKey) *sessionInfo {
sinfo.mySesPriv = *priv
sinfo.myNonce = *crypto.NewBoxNonce()
sinfo.theirMTU = 1280
sinfo.myMTU = 1280
ss.core.config.Mutex.RLock()
sinfo.myMTU = uint16(ss.core.config.Current.IfMTU)
ss.core.config.Mutex.RUnlock()
now := time.Now()
sinfo.timeOpened = now
sinfo.time = now