Avoid duplicate multicast peerings by having the higher key dial the lower one only

This commit is contained in:
Neil Alexander 2024-07-20 12:32:36 +01:00
parent 04c0acf71b
commit dc95131da5
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -403,7 +403,7 @@ func (m *Multicast) listen() {
continue continue
case adv.MinorVersion != core.ProtocolVersionMinor: case adv.MinorVersion != core.ProtocolVersionMinor:
continue continue
case adv.PublicKey.Equal(m.core.PublicKey()): case bytes.Compare(adv.PublicKey, m.core.PublicKey()) >= 0:
continue continue
} }
from := fromAddr.(*net.UDPAddr) from := fromAddr.(*net.UDPAddr)