1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-05 07:50:24 +08:00

fix(link): mtu check

This commit is contained in:
源文雨
2024-08-03 15:51:45 +08:00
parent 7e14ca5168
commit bafeb149be

View File

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