Skip to content

fix: ScopedIp considered Eq when interface_ids change#446

Merged
keepsimple1 merged 2 commits intomainfrom
scoped-ip-fix
Mar 27, 2026
Merged

fix: ScopedIp considered Eq when interface_ids change#446
keepsimple1 merged 2 commits intomainfrom
scoped-ip-fix

Conversation

@keepsimple1
Copy link
Copy Markdown
Owner

This is to fix issue #445 .

  • ScopedIpV4 previously had custom Eq/Hash impls that only compared addr, ignoring interface_ids. This meant consumers comparing HashSet across resolve events could not detect when new interfaces were added for the same IPv4 address, and HashSet::insert would silently discard updates.
  • Replaced custom impls with derived Eq, PartialEq, and Hash so interface_ids is included in equality and hashing.
  • Updated the daemon's address merge logic to use a linear scan by IP (instead of HashSet::take) since take no longer matches entries with different interface_ids.

@keepsimple1 keepsimple1 merged commit 247447b into main Mar 27, 2026
3 checks passed
@keepsimple1 keepsimple1 deleted the scoped-ip-fix branch March 27, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant