]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Abolish ip6.int support in `dig` and `mdig`
authorTony Finch <dot@dotat.at>
Fri, 2 Nov 2018 14:23:01 +0000 (14:23 +0000)
committerMark Andrews <marka@isc.org>
Tue, 6 Nov 2018 00:07:31 +0000 (19:07 -0500)
bin/dig/dig.c
bin/dig/dig.docbook
bin/dig/dighost.c
bin/dig/host.c
bin/dig/host.docbook
bin/dig/include/dig/dig.h
bin/dig/nslookup.c
bin/tools/mdig.c
bin/tools/mdig.docbook
lib/dns/byaddr.c
lib/dns/include/dns/byaddr.h

index 4249d308d2398440aded029cf44746439cb4c1e1..0649c089fe81980eb42c689d4cb6de30b103f0cf 100644 (file)
@@ -65,7 +65,7 @@ static char domainopt[DNS_NAME_MAXTEXT];
 static char hexcookie[81];
 
 static bool short_form = false, printcmd = true,
-       ip6_int = false, plusquest = false, pluscomm = false,
+       plusquest = false, pluscomm = false,
        ipv4only = false, ipv6only = false;
 static uint32_t splitwidth = 0xffffffff;
 
@@ -153,7 +153,6 @@ help(void) {
 "                 -b address[#port]   (bind to source address/port)\n"
 "                 -c class            (specify query class)\n"
 "                 -f filename         (batch mode)\n"
-"                 -i                  (use IP6.INT for IPv6 reverse lookups)\n"
 "                 -k keyfile          (specify tsig key file)\n"
 "                 -m                  (enable memory usage debugging)\n"
 "                 -p port             (specify port number)\n"
@@ -1606,7 +1605,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                        exit(0);
                        break;
                case 'i':
-                       ip6_int = true;
+                       /* deprecated */
                        break;
                case 'm': /* memdebug */
                        /* memdebug is handled in preparse_args() */
@@ -1787,13 +1786,12 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
                        *lookup = clone_lookup(default_lookup, true);
                *need_clone = true;
                if (get_reverse(textname, sizeof(textname), value,
-                               ip6_int, false) == ISC_R_SUCCESS) {
+                               false) == ISC_R_SUCCESS) {
                        strlcpy((*lookup)->textname, textname,
                                sizeof((*lookup)->textname));
                        debug("looking up %s", (*lookup)->textname);
                        (*lookup)->trace_root = ((*lookup)->trace  ||
                                                 (*lookup)->ns_search_only);
-                       (*lookup)->ip6_int = ip6_int;
                        if (!(*lookup)->rdtypeset)
                                (*lookup)->rdtype = dns_rdatatype_ptr;
                        if (!(*lookup)->rdclassset)
index f177ca713e8e24d43d4a0298d86dfba653983d0f..05fccbe4dcee6ea69851d6358cbac1df16e57aa2 100644 (file)
        </listitem>
       </varlistentry>
 
-      <varlistentry>
-       <term>-i</term>
-       <listitem>
-         <para>
-           Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
-           domain, which is no longer in use. Obsolete bit string
-           label queries (RFC 2874) are not attempted.
-         </para>
-       </listitem>
-      </varlistentry>
-
       <varlistentry>
        <term>-k <replaceable class="parameter">keyfile</replaceable></term>
        <listitem>
            <literal>94.2.0.192.in-addr.arpa</literal> and sets the
            query type and class to PTR and IN respectively. IPv6
            addresses are looked up using nibble format under the
-           IP6.ARPA domain (but see also the <option>-i</option>
-           option).
+           IP6.ARPA domain.
          </para>
        </listitem>
       </varlistentry>
index de7307aa43fd26be1e5ace953a504b1d163253d9..9750f140cd81d4e097882e479d58328d4ceb8243 100644 (file)
@@ -312,8 +312,7 @@ reverse_octets(const char *in, char **p, char *end) {
 }
 
 isc_result_t
-get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
-           bool strict)
+get_reverse(char *reverse, size_t len, char *value, bool strict)
 {
        int r;
        isc_result_t result;
@@ -327,8 +326,6 @@ get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
                dns_name_t *name;
                unsigned int options = 0;
 
-               if (ip6_int)
-                       options |= DNS_BYADDROPT_IPV6INT;
                name = dns_fixedname_initname(&fname);
                result = dns_byaddr_createptrname(&addr, options, name);
                if (result != ISC_R_SUCCESS)
@@ -652,7 +649,6 @@ make_empty_lookup(void) {
        looknew->nsfound = 0;
        looknew->tcp_mode = false;
        looknew->tcp_mode_set = false;
-       looknew->ip6_int = false;
        looknew->comments = true;
        looknew->stats = true;
        looknew->section_question = true;
index ce2442d94a420ac72c623517e54c57821f38a2a6..e5b31ab2024ea1df52aafcef59118389de32687f 100644 (file)
@@ -143,7 +143,6 @@ show_usage(void) {
 "       -c specifies query class for non-IN data\n"
 "       -C compares SOA records on authoritative nameservers\n"
 "       -d is equivalent to -v\n"
-"       -i IP6.INT reverse lookups\n"
 "       -l lists all hosts in a domain, using AXFR\n"
 "       -m set memory debugging flag (trace|record|usage)\n"
 "       -N changes the number of dots allowed before root lookup is done\n"
@@ -762,7 +761,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
                        default_lookups = false;
                        break;
                case 'i':
-                       lookup->ip6_int = true;
+                       /* deprecated */
                        break;
                case 'n':
                        /* deprecated */
@@ -841,8 +840,8 @@ parse_args(bool is_batchfile, int argc, char **argv) {
                check_ra = true;
 
        lookup->pending = false;
-       if (get_reverse(store, sizeof(store), hostname,
-                       lookup->ip6_int, true) == ISC_R_SUCCESS) {
+       if (get_reverse(store, sizeof(store), hostname, true)
+           == ISC_R_SUCCESS) {
                strlcpy(lookup->textname, store, sizeof(lookup->textname));
                lookup->rdtype = dns_rdatatype_ptr;
                lookup->rdtypeset = true;
index 1db8798d30f94a348d76b8a4e17c24d9e10ff42f..e754fd7d44875894658408d229adfe6bb7aee368 100644 (file)
        </listitem>
       </varlistentry>
 
-      <varlistentry>
-       <term>-i</term>
-       <listitem>
-         <para>
-           Obsolete.
-           Use the IP6.INT domain for reverse lookups of IPv6
-           addresses as defined in RFC1886 and deprecated in RFC4159.
-           The default is to use IP6.ARPA as specified in RFC3596.
-         </para>
-       </listitem>
-      </varlistentry>
-
       <varlistentry>
        <term>-l</term>
        <listitem>
index e7c14a4b8541e8085dae3ded2fd72f9c2545579f..a224c705a311ae6d00213e42caab10905c647c06 100644 (file)
@@ -103,7 +103,6 @@ struct dig_lookup {
                trace_root, /*% initial query for either +trace or +nssearch */
                tcp_mode,
                tcp_mode_set,
-               ip6_int,
                comments,
                stats,
                section_question,
@@ -280,8 +279,7 @@ int
 getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
 
 isc_result_t
-get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
-           bool strict);
+get_reverse(char *reverse, size_t len, char *value, bool strict);
 
 ISC_PLATFORM_NORETURN_PRE void
 fatal(const char *format, ...)
index 77b940d2e6a738c5fa57ed4672cf9b09587f1157..163f68d057eef4252002464380ed7dcdedfb4e68 100644 (file)
@@ -772,7 +772,7 @@ addlookup(char *opt) {
                rdclass = dns_rdataclass_in;
        }
        lookup = make_empty_lookup();
-       if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, true)
+       if (get_reverse(store, sizeof(store), opt, true)
            == ISC_R_SUCCESS) {
                strlcpy(lookup->textname, store, sizeof(lookup->textname));
                lookup->rdtype = dns_rdatatype_ptr;
index 899963c784c693a0b75a60424a83506dc2e37ebc..9365b52fa714f32a4bbbc9a375bc9d9772b88127 100644 (file)
@@ -120,7 +120,6 @@ static char hexcookie[81];
 
 struct query {
        char textname[MXNAME]; /*% Name we're going to be looking up */
-       bool ip6_int;
        bool recurse;
        bool have_aaonly;
        bool have_adflag;
@@ -774,7 +773,6 @@ help(void) {
 " local opt       is one of:\n"
 "                 -c class            (specify query class)\n"
 "                 -t type             (specify query type)\n"
-"                 -i                  (use IP6.INT for IPv6 reverse lookups)\n"
 "                 -x dot-notation     (shortcut for reverse lookups)\n"
 "                 +timeout=###        (Set query timeout) [UDP=5,TCP=10]\n"
 "                 +udptimeout=###     (Set timeout before UDP retry)\n"
@@ -995,8 +993,7 @@ reverse_octets(const char *in, char **p, char *end) {
 }
 
 static void
-get_reverse(char *reverse, size_t len, const char *value,
-           bool ip6_int)
+get_reverse(char *reverse, size_t len, const char *value)
 {
        int r;
        isc_result_t result;
@@ -1010,8 +1007,6 @@ get_reverse(char *reverse, size_t len, const char *value,
                dns_name_t *name;
                unsigned int options = 0;
 
-               if (ip6_int)
-                       options |= DNS_BYADDROPT_IPV6INT;
                name = dns_fixedname_initname(&fname);
                result = dns_byaddr_createptrname(&addr, options, name);
                CHECK("dns_byaddr_createptrname2", result);
@@ -1594,7 +1589,7 @@ dash_option(const char *option, char *next, struct query *query,
                        exit(0);
                        break;
                case 'i':
-                       query->ip6_int = true;
+                       /* deprecated */
                        break;
                case 'm':
                        /*
@@ -1674,7 +1669,7 @@ dash_option(const char *option, char *next, struct query *query,
                query->rdtype = rdtype;
                return (value_from_next);
        case 'x':
-               get_reverse(textname, sizeof(textname), value, query->ip6_int);
+               get_reverse(textname, sizeof(textname), value);
                strlcpy(query->textname, textname, sizeof(query->textname));
                query->rdtype = dns_rdatatype_ptr;
                query->rdclass = dns_rdataclass_in;
@@ -1788,7 +1783,6 @@ parse_args(bool is_batchfile, int argc, char **argv)
 
        if (!is_batchfile) {
                default_query.textname[0] = 0;
-               default_query.ip6_int = false;
                default_query.recurse = true;
                default_query.have_aaonly = false;
                default_query.have_adflag = true; /*XXX*/
index 1f65e6fefb941a6a3d85dc2e2dad081bfbebeb95..24a7d54ebd0fb021762d82a8ba7ce554fa038e5a 100644 (file)
       a reverse lookup with the "PTR" query type.
     </para>
 
-    <para>
-      The <option>-i</option> option sets the reverse domain for
-      IPv6 addresses to IP6.INT.
-    </para>
-
     <para>
       Reverse lookups &mdash; mapping addresses to names &mdash; are
       simplified by the <option>-x</option> option.
       query name like <literal>11.12.13.10.in-addr.arpa</literal> and
       sets the query type and class to PTR and IN respectively.
       By default, IPv6 addresses are looked up using nibble format
-      under the IP6.ARPA domain.  To use the older RFC1886 method
-      using the IP6.INT domain specify the <option>-i</option> option.
+      under the IP6.ARPA domain.
     </para>
 
     <para>
index 565d63b0ff924e0e17d2f3a0efb9a733b9198b08..a91b347ca7ba582184ead0c04fed45d68979f669 100644 (file)
@@ -55,6 +55,7 @@ dns_byaddr_createptrname(const isc_netaddr_t *address, unsigned int options,
        unsigned int len;
 
        REQUIRE(address != NULL);
+       UNUSED(options);
 
        /*
         * We create the text representation and then convert to a
@@ -81,11 +82,7 @@ dns_byaddr_createptrname(const isc_netaddr_t *address, unsigned int options,
                        *cp++ = '.';
                }
                remaining = sizeof(textname) - (cp - textname);
-               if ((options & DNS_BYADDROPT_IPV6INT) != 0) {
-                       strlcpy(cp, "ip6.int.", remaining);
-               } else {
-                       strlcpy(cp, "ip6.arpa.", remaining);
-               }
+               strlcpy(cp, "ip6.arpa.", remaining);
        } else
                return (ISC_R_NOTIMPLEMENTED);
 
index 893ca4d6bfd8b0b69ad98631850389ef929aae40..a020850259cbd1499b497679e6275bac42cfa18d 100644 (file)
@@ -60,13 +60,6 @@ typedef struct dns_byaddrevent {
        dns_namelist_t                  names;
 } dns_byaddrevent_t;
 
-/*
- * This option is deprecated since we now only consider nibbles.
-#define DNS_BYADDROPT_IPV6NIBBLE       0x0001
- */
-/*% Note DNS_BYADDROPT_IPV6NIBBLE is now deprecated. */
-#define DNS_BYADDROPT_IPV6INT          0x0002
-
 isc_result_t
 dns_byaddr_create(isc_mem_t *mctx, const isc_netaddr_t *address,
                  dns_view_t *view, unsigned int options, isc_task_t *task,
@@ -84,8 +77,6 @@ dns_byaddr_create(isc_mem_t *mctx, const isc_netaddr_t *address,
  *   1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa.
  * \endcode
  *
- *\li  #DNS_BYADDROPT_IPV6INT can be used to get nibble lookups under ip6.int.
- *
  * Requires:
  *
  *\li  'mctx' is a valid mctx.