mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-12 12:50:28 +08:00
chk mtu
This commit is contained in:
@@ -28,7 +28,7 @@ func (m *Me) AddPeer(cfg *PeerConfig) (l *Link) {
|
|||||||
if ok {
|
if ok {
|
||||||
return
|
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)
|
panic("invalid mtu for peer " + cfg.PeerIP)
|
||||||
}
|
}
|
||||||
l = &Link{
|
l = &Link{
|
||||||
|
|||||||
Reference in New Issue
Block a user