1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-06 08:20:25 +08:00
This commit is contained in:
源文雨
2022-05-13 23:36:22 +08:00
parent 1ded1c57c4
commit 80280b8b3b

View File

@@ -28,7 +28,7 @@ func (m *Me) AddPeer(cfg *PeerConfig) (l *Link) {
if ok {
return
}
if cfg.MTU == 0 || cfg.MTU == 65535 {
if cfg.MTU == 0 || cfg.MTU == 65535 || cfg.MTU > m.mtu {
panic("invalid mtu for peer " + cfg.PeerIP)
}
l = &Link{