DNS/qname-minimisation/RFC/Appendix Aについて、ここに記述してください。

REFUSEが返ってくることは想定されていないらしい。-- ToshinoriMaeno 2020-06-03 05:17:49

Appendix A. An Algorithm to Perform QNAME Minimisation

   (0) If the query can be answered from the cache, do so; otherwise, iterate as follows:

   (1) Find the closest enclosing NS RRset in your cache.  The owner of
       this NS RRset will be a suffix of the QNAME -- the longest suffix
       of any NS RRset in the cache.  Call this ANCESTOR.

   (2) Initialise CHILD to the same as ANCESTOR.

   (3) If CHILD is the same as the QNAME, resolve the original query
       using ANCESTOR's name servers, and finish.

   (4) Otherwise, add a label from the QNAME to the start of CHILD.

   (5) If you have a negative cache entry for the NS RRset at CHILD, go back to step 3.

   (6) Query for CHILD IN NS using ANCESTOR's name servers.  The response can be:
     (6a) A referral.  Cache the NS RRset from the authority section, and go back to step 1.

     (6b) An authoritative answer.  Cache the NS RRset from the answer section, and go back to step 1.

     (6c) An NXDOMAIN answer.  Return an NXDOMAIN answer in response to the original query, and stop.

     (6d) A NOERROR/NODATA answer.  Cache this negative answer, and go back to step 3.