5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 10:40:27 +00:00

Highlight packets that exceed the agreed session MTU

This commit is contained in:
Neil Alexander 2018-02-14 14:08:40 +00:00
parent 9fb45d77fc
commit 844212e95b

View File

@ -145,6 +145,10 @@ func (r *router) sendPacket(bs []byte) {
fallthrough fallthrough
//default: go func() { sinfo.send<-bs }() //default: go func() { sinfo.send<-bs }()
default: 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 { select {
case sinfo.send <- bs: case sinfo.send <- bs:
default: default: