You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Queries for an instance name with dots get no answer (names read from packets are not escaped) #536
Since #420, ServiceInfo::new escapes dots in the instance name, and write_name sends L\.A\.R\.A Hub as one label. Browsing works: the PTR answer carries the right single label.
But read_labels appends each incoming label as-is, so a question for that instance arrives as L.A.R.A Hub._lara._tcp.local.. It never matches the registered l\.a\.r\.a hub._lara._tcp.local. in handle_query, so SRV, TXT and ANY questions for the instance go unanswered. Even with a match, add_answer_of_service uses the question's name as the record owner, so the answer would be written split at the dots.
Send a QU query for SRV with the single label L.A.R.A Hub + _lara + _tcp + local (what Android NSD's resolveService asks when the records are not cached).
No response. A PTR query for _lara._tcp.local is answered, with SRV, TXT and A in the additional section.
Possible fix: in read_labels, escape . and \ inside a label, the inverse of parse_escaped_name. One change fixes both the lookup and the answer owner, and it removes the root cause of #483 (a label ending in \ swallowed the next separator). Side effect: a browsed fullname keeps its escapes and equals the registered fullname, so test_rfc6763_utf8_network_integration, which expects it unescaped, would change. With that fix, a QU SRV query for L.A.R.A Hub is answered, and all crate tests pass after updating that test and the #483 test. I can send the patch as a PR.
Activity
keepsimple1 commentedon Nov 1, 2026
Looks like a valid issue and your proposed fix makes sense. Please go ahead and send the PR. Thanks!
fix: escape dots and backslashes in labels read from packets (keepsim…