Merged
Conversation
Contributor
|
It looks like this would certainly allow a workaround. I think probably by iterating over the interfaces from |
Owner
Author
I didn't want to do that as it feels like against the design purpose of |
Contributor
|
Well done, thanks for this! |
keepsimple1
added a commit
that referenced
this pull request
Mar 25, 2026
ScopedIpV4 previously had a single interface_id (added in #439). This meant the same IPv4 address discovered via different interfaces would appear as two distinct entries in ResolvedService.addresses. This can cause confusion about how many IPv4 addresses actually discovered. Unlike IPv6 link-local addresses where the scope ID is part of the address identity, for IPv4 the interface is discovery metadata. Changes ScopedIpV4 to hold Vec<InterfaceId> instead of a single interface_id. Implements Eq/Hash manually based on addr only, so the same IPv4 address deduplicates correctly in HashSet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Help fixing issue #437
Problem
Currently for IPv4 there is no way to find out on which interface the service address(es) are found, while IPv6 doesn't have this problem.
Solution
Added
interface_id()toScopedIpV4to matchScopedIpV6that returns the interface on which a service address is found.