From b704d7b497d2e0a4fc58a7b78383d06fcd410ca1 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 4 Feb 2018 11:25:20 -0600 Subject: [PATCH] change mtu and enable udp chunking --- src/yggdrasil/udp.go | 2 +- yggdrasil.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yggdrasil/udp.go b/src/yggdrasil/udp.go index 8d88df1d..ea396889 100644 --- a/src/yggdrasil/udp.go +++ b/src/yggdrasil/udp.go @@ -322,7 +322,7 @@ func (iface *udpInterface) reader() { //////////////////////////////////////////////////////////////////////////////// -const udp_chunkSize = 65535 +const udp_chunkSize = 1024 func udp_decode(bs []byte) (chunks, chunk, count uint8, payload []byte) { if len(bs) >= 3 { diff --git a/yggdrasil.go b/yggdrasil.go index 90ddb907..e583b184 100644 --- a/yggdrasil.go +++ b/yggdrasil.go @@ -249,8 +249,8 @@ func main() { n := node{} n.init(cfg, logger) logger.Println("Starting tun...") - n.core.DEBUG_startTun(cfg.IfName) // 1280, the smallest supported MTU - //n.core.DEBUG_startTunWithMTU(cfg.IfName, 65535) // Largest supported MTU + //n.core.DEBUG_startTun(cfg.IfName) // 1280, the smallest supported MTU + n.core.DEBUG_startTunWithMTU(cfg.IfName, 65535) // Largest supported MTU defer func() { logger.Println("Closing...") n.core.DEBUG_stopTun()