2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Merge branch 'u/fanf2/deprecate-ip6-int' into 'master'

Abolish ip6.int support in `dig` and `mdig`

See merge request isc-projects/bind9!969
This commit is contained in:
Mark Andrews
2018-11-05 19:29:23 -05:00
12 changed files with 19 additions and 73 deletions

View File

@@ -1,3 +1,6 @@
5077. [cleanup] Remove ip6.int support (-i) from dig and mdig.
[GL !969]
5076. [bug] "require-server-cookie" was not effective if
"rate-limit" was configured. [GL #617]

View 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)

View File

@@ -271,17 +271,6 @@
</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>
@@ -394,8 +383,7 @@
<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>

View 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;

View 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;

View File

@@ -179,18 +179,6 @@
</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>

View 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, ...)

View 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;

View 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*/

View File

@@ -420,11 +420,6 @@
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.
@@ -434,8 +429,7 @@
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>

View 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);

View 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.