From f61507238e62c62e8e72e0e6bbd3c58dc52889f2 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sat, 15 May 2021 16:23:44 -0500 Subject: [PATCH] cleanup unused MTU code from tun keystore --- src/tuntap/keystore.go | 2 -- src/tuntap/tun.go | 1 - 2 files changed, 3 deletions(-) diff --git a/src/tuntap/keystore.go b/src/tuntap/keystore.go index a930630..7974874 100644 --- a/src/tuntap/keystore.go +++ b/src/tuntap/keystore.go @@ -28,7 +28,6 @@ type keyInfo struct { key keyArray address address.Address subnet address.Subnet - mtu MTU // TODO use this timeout *time.Timer // From calling a time.AfterFunc to do cleanup } @@ -114,7 +113,6 @@ func (k *keyStore) update(key ed25519.PublicKey) *keyInfo { info.key = kArray info.address = *address.AddrForKey(ed25519.PublicKey(info.key[:])) info.subnet = *address.SubnetForKey(ed25519.PublicKey(info.key[:])) - info.mtu = MTU(^uint16(0)) // TODO var isOutgoing bool if k.addrBuffer[info.address] != nil { isOutgoing = true diff --git a/src/tuntap/tun.go b/src/tuntap/tun.go index 79736a0..e8f7fcb 100644 --- a/src/tuntap/tun.go +++ b/src/tuntap/tun.go @@ -150,7 +150,6 @@ func (tun *TunAdapter) _start() error { if tun.MTU() != mtu { tun.log.Warnf("Warning: Interface MTU %d automatically adjusted to %d (supported range is 1280-%d)", current.IfMTU, tun.MTU(), MaximumMTU()) } - // TODO tun.core.SetMaximumSessionMTU(tun.MTU()) tun.isOpen = true go tun.read() go tun.write()