fix: preserve announcements after excluded address changes - #507
Open
Twister915 wants to merge 1 commit into
Open
Twister915 wants to merge 1 commit into
Twister915 wants to merge 1 commit into
Conversation
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.
Hello! I am submitting three fixes to bugs I encountered while developing a tvOS app for myself.
As far as I understand it, this fixes the third bug I encountered- when my Mac Studio (hosting a service) changed it's IPv6 address for privacy reasons (a macOS feature), my service appeared no longer available from my application.
After reviewing this patch myself, it looks as if the fix is pretty simple: skip updates about unsupported addresses (in my case, IPv6 addresses).
Happy to work with you through any review notes! Everything below this line is pure AI (gpt-6 astra)-
An auto-address service can stop answering discovery queries indefinitely after an address excluded by its policy appears on an existing interface. For example, an IPv4-only service is announced, then IPv6 privacy-address rotation adds a new address on the same interface.
insert_ipaddrrejects that address, butadd_interfacestill attempts an announcement through the new address's socket family. No eligible records exist, so the attempt returns false and the shared per-interface status becomesProbing. No probes were created to restoreAnnounced; query handling then skips the service.Skip service updates for unsupported addresses, using the same predicate as automatic address insertion. Other services and the daemon's interface tracking continue to process the new address normally.
The regression registers a real service, completes its probes, verifies it is announced, then injects an excluded address into daemon state. It covers IPv4-only and IPv6-only policies using loopback and a private port; it does not change host network configuration. Reverting the fix makes the final assertion fail with
Probinginstead ofAnnounced.Validation
cargo fmt --check, async-only build, and all-feature documentation with warnings denied pass.test_hostname_resolution_address_removedfailed. The same test fails on untouched upstream75d1941on this host.This is one independent commit on current upstream
main; no other PR is required.