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

(cherry picked from commit f45762a5be)
This commit is contained in:
Mark Andrews 2026-03-31 12:26:42 +11:00 committed by Mark Andrews (GitLab job 7168614)
parent dbfc344e63
commit bc9c2539e3

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.