Skip to content

bugfix: remove duplicated address record for IPv6 on a wrong interface - #373

Merged
keepsimple1 merged 6 commits into
mainfrom
debug-dup
Jul 29, 2025
Merged

keepsimple1 merged 6 commits into
mainfrom
debug-dup

Conversation

@keepsimple1

@keepsimple1 keepsimple1 commented Jul 17, 2025 •

Copy link
Copy Markdown
Owner

This is to fix issue #372 .

Call bind_device_by_index_v6 to make sure a socket only receives packets arrived at the specific interface. Currently only for non-Windows platforms.

update: use socket-pktinfo (with my patch) to receive UDP packets with control info, including if_index, src and dst addr. Now we can get rid of the per interface socket, and use a common IPv4 socket and IPv6 socket for all interfaces. This helps to fix the "duplicated" incoming packets address records issue.

@keepsimple1
keepsimple1 marked this pull request as draft July 22, 2025 05:05
@keepsimple1
keepsimple1 marked this pull request as ready for review July 23, 2025 02:57
@keepsimple1 keepsimple1 changed the title debug: check InterfaceId of DnsAddress records for IPv6 bugfix: remove duplicated address record for IPv6 on a wrong interface Jul 23, 2025
This is possible as we moved to use socket-pktinfo crate.
@keepsimple1
keepsimple1 merged commit 0d6ba35 into main Jul 29, 2025
@keepsimple1
keepsimple1 deleted the debug-dup branch July 29, 2025 03:42
hrzlgnm added a commit to hrzlgnm/mdns-sd that referenced this pull request Jul 31, 2025
This became obsolete with keepsimple1#373, as we now only use at max one IPv4 and
at max one IPv6 address per interface.
keepsimple1 pushed a commit that referenced this pull request Aug 1, 2025
This became obsolete with #373, as we now only use at max one IPv4 and
at max one IPv6 address per interface.
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