fix: doc: nsupdate does not handle zero length RDATA well

Nsupdate does not distinguish between a non-existing RDATA field
and an empty RDATA field when determining which action is desired
when the RDATA field is empty. This only affects a few data types,
like APL, which allow an empty RDATA field.  Document a workaround
of using the '\# 0' form for entering these specific records. e.g.

    # delete the APL RRset
    update delete IN APL
    # delete the APL record with a zero length rdata
    update delete IN APL \# 0

Closes #5835

Merge branch '5835-nsupdate-doc-zero-length-rdata-how-to' into 'main'

See merge request isc-projects/bind9!11775
This commit is contained in:
Mark Andrews 2026-04-09 10:33:41 +10:00
commit 249fb48758

View file

@ -354,16 +354,25 @@ The command formats and their meanings are as follows:
``domain-name``. The ``data`` are written in the standard text
representation of the resource record's RDATA.
Note RDATA which is empty (e.g. APL with an zero length rdata)
needs to be entered using ``\# 0`` form.
``update delete domain-name ttl class type data``
This command deletes any resource records named ``domain-name``. If ``type`` and
``data`` are provided, only matching resource records are removed.
The Internet class is assumed if ``class`` is not supplied. The
``ttl`` is ignored, and is only allowed for compatibility.
Note RDATA which is empty (e.g. APL with an zero length rdata)
needs to be entered using ``\# 0`` form.
``update add domain-name ttl class type data``
This command adds a new resource record with the specified ``ttl``, ``class``, and
``data``.
Note RDATA which is empty (e.g. APL with an zero length rdata)
needs to be entered using ``\# 0`` form.
``show``
This command displays the current message, containing all of the prerequisites and
updates specified since the last send.