From 3b6c726a3cb6345f8afd647944cde58c57b6f573 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 29 May 2019 19:11:12 +0100 Subject: [PATCH] Fix bug where MTU was ignored by sessions, resulting in default 1280 --- src/yggdrasil/session.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/yggdrasil/session.go b/src/yggdrasil/session.go index 3a4eb2e..68b9095 100644 --- a/src/yggdrasil/session.go +++ b/src/yggdrasil/session.go @@ -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