mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-30 13:35:19 +00:00
Highlight packets that exceed the agreed session MTU
This commit is contained in:
parent
9fb45d77fc
commit
844212e95b
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user