threefoldtech / mycelium

End-2-end encrypted IPv6 overlay network
Apache License 2.0
20 stars 10 forks source link

Subnet comparison is broken #228

Closed LeeSmet closed 1 month ago

LeeSmet commented 1 month ago

Currently subnet derives PartialEq (and the inner type does so as well). This means equality checks are done based on the actual in memory data. In practice, we want equality checks based on the prefix only. Fixing this should fix seqno requests not being handled by peers as well. It does mean that 2 subnets differing only in the IP which is not part of the subnet, will be considered equal. Since we talk about a subnet here, that is fine.