Repository navigation
Fix/question class matching - #553
Merged
keepsimple1 merged 6 commits intoNov 21, 2026
Merged
Conversation
keepsimple1
reviewed
Nov 18, 2026
keepsimple1
left a comment
Owner
There was a problem hiding this comment.
Thanks for your PR! Comments inline.
Contributor
Author
|
Thanks for the review! I’ve pushed the changes: simplified the class helper, preserved the accepted questions in legacy replies, updated the test error message, and shortened the comment. All 111 library tests pass. |
keepsimple1
reviewed
Nov 19, 2026
…x/question-class-matching # Conflicts: # src/dns_parser.rs
thankgodode
commented
Nov 19, 2026
thankgodode
left a comment
Contributor
Author
There was a problem hiding this comment.
Addressed the latest review comments and merged upstream main to resolve the conflict. All 112 library tests pass. Ready for another look—thanks!
keepsimple1
approved these changes
Nov 21, 2026
keepsimple1
left a comment
Owner
There was a problem hiding this comment.
Thanks for updating, looks good! I've made a couple of nit edits before ready to merge.
Sealdot
added a commit
to Sealdot/mdns-sd
that referenced
this pull request
Nov 22, 2026
When a probe conflict triggers name_change/hostname_change, the appended ` (n)`/`-n` suffix can push the first label past MAX_LABEL_BYTES, after which write_name rejects every packet and the service silently vanishes. Shorten the base so the label with the new suffix still fits, like mDNSResponder: measure wire bytes via escape-aware helpers in dns_parser.rs (\. and \\ count as one byte, never cut inside a pair or a UTF-8 char), trim a trailing space/`-`, and recompute on every rename as ` (9)` -> ` (10)` grows the suffix. register_service now rejects an instance label over 63 wire bytes up front instead of failing silently on the network. Fixes keepsimple1#549. Rebased onto main @ e5ee843 (keepsimple1#553, keepsimple1#555): test imports union upstream's new_multicast_socket with this change's check_instance_label_length. AI assistance: Cognition Devin CLI agent (SWE-2 High).
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.
Summary
Fix the responder so it checks a question’s DNS class before answering. It now answers class
INand classANYqueries, while ignoring unsupported classes such as class2.Why
Previously, a class
2query for a known hostname could receive a classINaddress record, even though the classes did not match.Testing
IN,ANY, unsupported classes, and the QU bit.INreceives an answer and class2does not.cargo test --lib.