spf-discuss
[Top] [All Lists]

Re: DNS gurus: What is the max length of a TXT rec ords?

2004-02-09 18:12:10
In <40282909(_dot_)4070806(_at_)verisign(_dot_)com> 
<spf-discuss(_at_)jburst(_dot_)org> writes:

Individual strings in a text record can be no longer than 255 bytes,
but the TXT RR itself can have any number of individual strings (up to
the 64k DNS limit).

example.com   IN   TXT   "string which is 255 characters..." "another
string which is 255 characters..." "still another 255 character string"

Hmmm...  I guess I had (wrongly) assumed that this was just syntatical
sugar and the strings were concatinated together like C would.

Each string is limited to 255 bytes because DNS encodes strings with a
leading unsigned length byte on the wire. In theory, you can have an
unlimited number of strings up to the 64k total RR size limit, if
you're willing to do TCP.

Doing some quick checking, it appears that these multiple strings all come
back in one answer record, where as seperate TXT with the same name
come back in different answer records.  Looks like I need to read the
RFC to see if the order of these multiple strings on a single TXT
record is guarenteed to be in the right order.  If so, we can splice
them together.

If I understand things correctly, this is basically what djbdns is
doing, only it is breaking things into 127 chunks instead of 255.


-wayne

-------
Sender Permitted From: http://spf.pobox.com/
Archives at http://archives.listbox.com/spf-discuss/current/
Latest draft at http://spf.pobox.com/spf-draft-20040209.txt
Wiki: http://spfwiki.infinitepenguins.net/pmwiki.php/SenderPermittedFrom/
To unsubscribe, change your address, or temporarily deactivate your 
subscription, 
please go to 
http://v2.listbox.com/member/?listname(_at_)©#«Mo\¯HÝÜîU;±¤Ö¤Íµø?¡