From e113b8d5305d8a5758243b7faedc258843f52ade Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 25 Feb 2018 21:56:09 -0600 Subject: [PATCH 1/2] incrase max MTU --- yggdrasil.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yggdrasil.go b/yggdrasil.go index 50a9c63c..857a3c50 100644 --- a/yggdrasil.go +++ b/yggdrasil.go @@ -118,7 +118,7 @@ func generateConfig() *nodeConfig { cfg.Multicast = true cfg.LinkLocal = "" cfg.IfName = "auto" - cfg.IfMTU = 1280 + cfg.IfMTU = 65535 if runtime.GOOS == "windows" { cfg.IfTAPMode = true } else { @@ -177,7 +177,7 @@ func (n *node) listen() { saddr := addr.String() //if _, isIn := n.peers[saddr]; isIn { continue } //n.peers[saddr] = struct{}{} - n.core.DEBUG_addTCPConn(saddr) // FIXME? can result in 2 connections per peer + n.core.DEBUG_addTCPConn(saddr) //fmt.Println("DEBUG:", "added multicast peer:", saddr) } } From ddc4773b1968f5f6a6ca5946c86527c6d8e09158 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Mon, 26 Feb 2018 18:12:28 -0600 Subject: [PATCH 2/2] don't drop send/recv traffic going through the crypto workers, just block until they're free (TODO run further tests to make sure this doesn't cycle/deadlock) --- src/yggdrasil/router.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/yggdrasil/router.go b/src/yggdrasil/router.go index c25d64a7..267f0766 100644 --- a/src/yggdrasil/router.go +++ b/src/yggdrasil/router.go @@ -170,11 +170,7 @@ func (r *router) sendPacket(bs []byte) { // Don't continue - drop the packet return } - select { - case sinfo.send <- bs: - default: - util_putBytes(bs) - } + sinfo.send <- bs } } @@ -225,11 +221,7 @@ func (r *router) handleTraffic(packet []byte) { return } //go func () { sinfo.recv<-&p }() - select { - case sinfo.recv <- &p: - default: - util_putBytes(p.payload) - } + sinfo.recv <- &p } func (r *router) handleProto(packet []byte) {