Subject: Can TXT have multiple fields?

From: "Eric A. Hall" <[email-masked]>
Date: Thu, 13 Apr 2000 17:55:19 -0700

Can TXT have multiple fields in its answer data?

1035 is the source of my question:

   3.3.14. TXT RDATA format

	    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

	    /                   TXT-DATA                    /

	    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

	where:

	TXT-DATA        One or more <character-string>s.

	                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

That means that a single TXT RR can have multiple <character-string> as
its answer data.

<character-string> is defined as:

   3.3. Standard RRs

	<character-string> is a single length octet followed by
	that number of characters.

So a TXT RR can have multiple <character-strings> with each of them
having a separate length byte. EG, each TXT RR can have a variable
number of fields, not just a single variable-length field.

BIND doesn't seem to support this usage, although maybe I'm trying to
delineate the test data wrong. Using:

	test-txt  86400  IN  TXT ("answer data" "more data")

is rejected when the zone loads.

What say you all?

-- 
Eric A. Hall                                            [email-masked]
+1-650-685-0557                                    http://www.ehsco.com

to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.

---

From: "Eric A. Hall" <[email-masked]>
Date: Thu, 13 Apr 2000 20:46:17 -0700

> Can TXT have multiple fields in its answer data?

Yes, tested on another server, xfer to other test servers succeeds.

Pardon the noise.

---

From: Paul A Vixie <[email-masked]>
Date: Thu, 13 Apr 2000 21:07:41 -0700

> Can TXT have multiple fields in its answer data?

yes.

> number of fields, not just a single variable-length field.

yes.

> is rejected when the zone loads.

BIND4 and BIND8 do the wrong thing with parenthesis.  do this:

	test-txt  96400  IN TXT  "answer data" "more data"

---

From: [email-masked]
Date: Fri, 14 Apr 2000 13:49:06 +1000

> 1035 is the source of my question:

	Well the question would have been better directed at
	[email-masked] than namedroppers.

	BIND supports multiple txt strings in a single txt record.

	The following works:
	test-txt  86400  IN  TXT "answer data" "more data"

	BIND 4/8 does not have generalised ( ) support which is why
	the example failed.

	BIND 9 has generalised ( ) support

	Mark
--
Mark Andrews, Nominum Inc. / Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: [email-masked]

---

From: Rob Austein <[email-masked]>
Date: Fri, 14 Apr 2000 01:46:34 -0400

Date: Thu, 13 Apr 2000 21:13:54 -0400
   From: "Eric A. Hall" <[email-masked]>

Yes.

   BIND doesn't seem to support this usage

Old versions of BIND handled TXT strangely when parsing the master
file: they supported only a single string in the zone file, but broke
it up into 255 octet chunks to comply with the wire format.  This was
fixed about four years ago.  Modern versions should be ok with:

mumble.example.com. TXT "fee" "fie" "foe" "fum"

---

From: Paul A Vixie <[email-masked]>
Date: Fri, 14 Apr 2000 10:25:20 -0700

> mumble.example.com. TXT "fee" "fie" "foe" "fum"

the quotes aren't necessary, according to the rfc or to the bind parser,
unless you're trying to make a single text string.  that means, according
to the rfc and to modern bind:

mumble.example.com. TXT "fee" "fie" "foe" "fum"		; four strings
mumble.example.com. TXT fee fie foe fum			; four strings
mumble.example.com. TXT "fee fie foe fum"		; one string