From 844212e95b2956049846052aeca651d73d316e48 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 14 Feb 2018 14:08:40 +0000 Subject: [PATCH] Highlight packets that exceed the agreed session MTU --- src/yggdrasil/router.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/yggdrasil/router.go b/src/yggdrasil/router.go index 15e2ff3c..e0884ef4 100644 --- a/src/yggdrasil/router.go +++ b/src/yggdrasil/router.go @@ -145,6 +145,10 @@ func (r *router) sendPacket(bs []byte) { fallthrough //default: go func() { sinfo.send<-bs }() default: + if len(bs) > int(sinfo.getMTU()) { + // TODO: Send ICMPv6 Packet Too Big back to the TUN/TAP adapter + sinfo.core.log.Printf("Packet length %d exceeds session MTU %d", len(bs), sinfo.getMTU()) + } select { case sinfo.send <- bs: default: