fix(mdns): Fix parsing of mdns.txt records containing booleans#1038
Merged
david-cermak merged 1 commit intoespressif:masterfrom Apr 10, 2026
Merged
fix(mdns): Fix parsing of mdns.txt records containing booleans#1038david-cermak merged 1 commit intoespressif:masterfrom
david-cermak merged 1 commit intoespressif:masterfrom
Conversation
RFC 6763 / page 16 explicitly allows booleans without '='. Failing to parse these caused mdns_query_txt() to return a null pointer. This is a simple and straight-forward fix for the scan index stepping correctly when no '=' is present. Signed-off-by: Frank Mertens <frank@cyblogic.de>
david-cermak
approved these changes
Apr 9, 2026
Collaborator
david-cermak
left a comment
There was a problem hiding this comment.
Thank you for the fix!
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.
RFC 6763 / page 16 explicitly allows booleans without '='. Failing to parse these caused mdns_query_txt() to return a null pointer. This is a simple and straight-forward fix for the scan index stepping correctly when no '=' is present.
Testing
I did positive and negative testing by changing a boolean in the mdns.txt record of the target host.
I did test it with a "register=true" and then again with just a "register" txt record.
Without this single-line patch the latter would fail to parse when calling mdns_query_txt().
Note
Medium Risk
Touches mDNS TXT record parsing on incoming network packets; a small index-calculation change could affect how subsequent TXT entries/values are read for edge-case inputs.
Overview
Fixes parsing of mDNS TXT records that omit
'='(RFC 6763 boolean-style keys) by advancing the scan index only when an equals sign is actually present. This prevents boolean TXT entries like"register"from breaking TXT parsing and returning missing/NULL results.Written by Cursor Bugbot for commit a6e0951. This will update automatically on new commits. Configure here.