Draft
Conversation
Member
fhunleth
commented
Mar 3, 2026
- Support ANY query type and case-insensitive domain matching
- Set cache-flush bit on unique (non-shared) mDNS records
- Add mDNS probing and announcing state machine
- Add known-answer suppression module
- Integrate probing, response timing, and suppression into Responder
RFC 6762 §6 requires that query type 255 (ANY) matches all record types and query class 255 (ANY) matches all classes. Also, DNS names must be compared case-insensitively per the RFC. Replace the exact match in Table.run_query/2 with wildcard-aware helpers for type, class, and domain matching. Handle both the :any atom and integer 255 that Erlang's :inet_dns may produce. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RFC 6762 §10.2 requires the cache-flush bit to be set on unique records (A, AAAA, SRV, TXT) in responses, telling receivers to flush stale cached entries. Shared records (PTR) must not have this bit set. Set `func: true` in Table.Builder for all non-PTR record types. Update test expectations to match the new func field values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement RFC 6762 §8 probing and announcing as a pure functional state machine in MdnsLite.Probe. The module has no side effects -- it returns action tuples that the caller dispatches. The state machine transitions through :probing -> :announcing -> 🏃 - Sends 3 probe packets at 250ms intervals with random initial delay - On success, sends up to 8 announcements with doubling intervals - Detects conflicts and renames hostname (hostname-2, -3, etc.) - Rate-limits probing after 15 consecutive conflicts - Handles simultaneous probe tiebreaking per RFC 6762 §8.2 Also adds Options.conflict_rename/1 helper for hostname renaming. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement RFC 6762 §7.1 known-answer suppression as a pure function. When a querier includes known-answer records in a query, the responder suppresses answers where the known-answer TTL exceeds half of our TTL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rework the Responder GenServer to implement the mDNS protocol behaviors required by RFC 6762: Probing and announcing (§8): - Start probing on interface init, dispatch Probe actions via timers - Suppress query responses for names being probed - Detect conflicts from incoming responses and simultaneous probes - Rename hostname and re-probe on conflict via TableServer Response handling (§6, §7): - Strip cache-flush bit on unicast/legacy responses (§6.7) - Delay shared record (PTR) responses by random 20-125ms (§6) - Aggregate rapid queries to same destination into single response - Apply known-answer suppression from query answer sections (§7.1) - Aggregate answers for multiple questions per query into one response - Handle TC (truncated) bit by accumulating known-answers across packets Goodbye packets (§10.1): - TableServer computes record diffs on option changes and notifies Responders of removed records - Responder multicasts removed records with TTL=0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.