mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-06 08:20:25 +08:00
chk mtu
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user