New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key/Value Pairs in TXT Records (for DNS-SD RFC6763) #913
Comments
Thanks for the post. There is no key/value pair concept in TXT record. The zone file syntax that you mention exists to allow defining a TXT record that is greater than 255 char in length. Each of the strings in double quotes in the syntax is an "character string" which is limited to 255 chars max. When the zone file is processed, all those strings are concatenated to form a single TXT record. Which is why when you used the Import Zone option, the strings were concatenated since the DNS server treats the TXT record data as a single string. If this TXT record is what you a defining yourself then you need to add a separator character, something like I hope that clears the confusion. |
I missed the RFC reference in the title and it does seem that the standard uses these "character strings" thing in TXT record as a key/value pair entry. Right now, this is not supported as it treats these separate strings as a single string. Will see how this can be implemented. |
Thank you for your quick reply. Please let me know when you implement this feature. |
Yes, I will post it here when its available so that you get a notification. |
I don't know how to add multiple key/value pairs to one TXT record. In Zonefile syntax (e.g. for BIND) it has to be something like this:
test.name.internal. TXT "api_ver=v1.0,v1.1,v1.2,v1.3" "api_proto=http" "pri=0" "api_auth=false"
But the result of "Import Zone" of this Line is: api_ver=v1.0,v1.1,v1.2,v1.3api_proto=httppri=0api_auth=false
A query for this record gives api_ver as the key and the rest as value string.
How can I separate the Key/Value pairs?
Thank you for your help!
The text was updated successfully, but these errors were encountered: