Hacker News new | ask | show | jobs
by dc396 25 days ago
No. It's been a while, but I believe if you use multiple TXTs, resolvers can reorder them as they see fit. For example,

label IN TXT "foo " IN TXT "bar " IN TXT "baz"

You can have any number of TXT RRs with a label, allowing up to 65,280 bytes. However, resolvers can reorder those 3 TXT RRs.

If you put the text strings in quotes in a single TXT RR, e.g.:

label IN TXT "foo " "bar " "baz"

You'll get "foo bar baz" and each of the strings can be up to 255 bytes. I think (but I'm too lazy to verify) that the maximum length of a concatenated string is implementation dependent.

1 comments

    for  i in $(seq 100);do echo -en '0';done
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

    test            69s     in      txt     "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"

    nsd-checkzone nochan.net ./nochan.net.zone
    zone nochan.net is ok

    nsd-control reload nochan.net
    ok

    # from my laptop
    dig -t txt +short test.nochan.net
    "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
Still shows up as three quoted strings 100 characters long each but not 300 0's meaning no concatenation at least not when using dig which is what this thread is about.