nsupdate, semicolon, backslash
marka at isc.org
Fri Sep 12 21:03:15 UTC 2014
In message <54130F2A.9040207 at yahoo.fr>, Giuseppe writes:
> I work with nsupdate for update our domains zones. And I have problem with semicolonin TXT record type.
> A small example:
> nsupdate -v
> > update add test1.com 400 TXT "hello*;*"
> > update add test2.com 400 TXT "hello*\;*"
> > show
> Outgoing update query:
> ;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 0
> ;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
> ;; UPDATE SECTION:
> test1.com. 400 IN TXT "hello*\;*"
> test2.com. 400 IN TXT "hello*\;*"
> In my Zone file it is the same problem.
> I would like:
> test1.com. 400 IN TXT "hello*;*"
> without backslash before semicolon. Is important because service using "secure._domainKey", "_adsp._domainKey", etc.. no
> t work if
> backslashis in zone and semicolon is needed.
> Other are the same problem?
Backslash and semicolons are special characters in master files.
DiG prints records in master file format. This allows the record
to be cut and pasted into master files, nsupdate etc. It also means
that the presentation encoding doesn't change between AXFR, IXFR
and other types. It also escapes some characters that may not
always strictly need escaping in every circumstance.
'@' '$' '.' '\' '"' are all special characters in master files.
To enter a backslash one has to enter two backslashes. A backslash
before a semicolon turns off its special meaning of comment introducer.
A backslash says the next character is a literal except when that
character is a digit in which case it the start of \DDD which is
the decimal value or the character.
THe RHS below is without the master file escaping
"\h\e\l\l\o\;\*" -> hello;*
hello\;* -> hello;*
"hello;*" -> hello;*
Now to add a backslash you need to enter two escapes, the RHS is
again without master file escaping.
"hello\\;*" -> hello\;*
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: marka at isc.org
More information about the bind-users