Fix session bug, fix dummy adapter, fix mobile framework builds

This commit is contained in:
Neil Alexander 2019-04-01 19:59:50 +01:00
parent 047717abf2
commit 58f5cc88d0
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 58 additions and 45 deletions

View file

@ -277,7 +277,9 @@ func (ss *sessions) createSession(theirPermKey *crypto.BoxPubKey) *sessionInfo {
sinfo.mySesPriv = *priv
sinfo.myNonce = *crypto.NewBoxNonce()
sinfo.theirMTU = 1280
sinfo.myMTU = uint16(ss.core.router.adapter.MTU())
if ss.core.router.adapter != nil {
sinfo.myMTU = uint16(ss.core.router.adapter.MTU())
}
now := time.Now()
sinfo.time = now
sinfo.mtuTime = now