summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/bin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2020-01-09 14:18:31 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2020-01-09 14:18:31 +0000
commitf8383418ca1598299c555b342b4b5e02f54268e8 (patch)
treebd4f35e8ce57251d044101b113165f44df4f7b40 /usr.sbin/bind/bin
parent964cd36910587fd9d49bf1c096a0cf52c151b62f (diff)
Assorted unifdefs:
#define ISC_PLATFORM_NEEDSYSSELECTH 1 #define ISC_PLATFORM_HAVESTATNSEC 1 #define ISC_PLATFORM_RLIMITTYPE rlim_t #define ISC_PLATFORM_HAVELONGLONG 1 #undef ISC_PLATFORM_BRACEPTHREADONCEINIT #undef ISC_PLATFORM_USEDECLSPEC #define ISC_PLATFORM_HAVESYSUNH 1 #define ISC_PLATFORM_HAVESTRINGSH 1 #define ISC_PLATFORM_WANTAES 1 #define ISC_PLATFORM_USESIT 1 #define LIBISC_EXTERNAL_DATA #define LIBDNS_EXTERNAL_DATA #define LIBISCCFG_EXTERNAL_DATA #define LIBBIND9_EXTERNAL_DATA #define LIBTESTS_EXTERNAL_DATA prodding deraadt@
Diffstat (limited to 'usr.sbin/bind/bin')
-rw-r--r--usr.sbin/bind/bin/dig/dig.c14
-rw-r--r--usr.sbin/bind/bin/dig/dighost.c22
-rw-r--r--usr.sbin/bind/bin/dig/include/dig/dig.h4
3 files changed, 2 insertions, 38 deletions
diff --git a/usr.sbin/bind/bin/dig/dig.c b/usr.sbin/bind/bin/dig/dig.c
index 6395b5176b5..e4dfac8eb89 100644
--- a/usr.sbin/bind/bin/dig/dig.c
+++ b/usr.sbin/bind/bin/dig/dig.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dig.c,v 1.32 2020/01/09 13:52:22 florian Exp $ */
+/* $Id: dig.c,v 1.33 2020/01/09 14:18:29 florian Exp $ */
/*! \file */
@@ -76,9 +76,7 @@ static char *argv0;
static int addresscount = 0;
static char domainopt[DNS_NAME_MAXTEXT];
-#ifdef ISC_PLATFORM_USESIT
static char sitvalue[256];
-#endif
static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
@@ -721,9 +719,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
char *cmd, *value, *ptr, *code;
isc_uint32_t num;
isc_boolean_t state = ISC_TRUE;
-#if defined(DIG_SIGCHASE) || defined(ISC_PLATFORM_USESIT)
size_t n;
-#endif
strlcpy(option_store, option, sizeof(option_store));
ptr = option_store;
@@ -841,23 +837,19 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
printcmd = state;
break;
case 'o': /* comments */
-#ifdef ISC_PLATFORM_USESIT
switch (cmd[2]) {
case 'o':
FULLCHECK("cookie");
goto sit;
case 'm':
-#endif
FULLCHECK("comments");
lookup->comments = state;
if (lookup == default_lookup)
pluscomm = state;
-#ifdef ISC_PLATFORM_USESIT
break;
default:
goto invalid_option;
}
-#endif
break;
case 'r':
FULLCHECK("crypto");
@@ -1185,7 +1177,6 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
goto invalid_option;
}
break;
-#if defined(DIG_SIGCHASE) || defined(ISC_PLATFORM_USESIT)
case 'i':
switch (cmd[2]) {
#ifdef DIG_SIGCHASE
@@ -1196,7 +1187,6 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
lookup->dnssec = ISC_TRUE;
break;
#endif
-#ifdef ISC_PLATFORM_USESIT
case 't': /* sit */
FULLCHECK("sit");
sit:
@@ -1212,12 +1202,10 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
} else
lookup->sitvalue = NULL;
break;
-#endif
default:
goto invalid_option;
}
break;
-#endif
case 'p': /* split */
FULLCHECK("split");
if (value != NULL && !state)
diff --git a/usr.sbin/bind/bin/dig/dighost.c b/usr.sbin/bind/bin/dig/dighost.c
index 35c68cc702b..50143d1f8f9 100644
--- a/usr.sbin/bind/bin/dig/dighost.c
+++ b/usr.sbin/bind/bin/dig/dighost.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dighost.c,v 1.25 2020/01/09 13:52:22 florian Exp $ */
+/* $Id: dighost.c,v 1.26 2020/01/09 14:18:29 florian Exp $ */
/*! \file
* \note
@@ -145,9 +145,7 @@ int ndots = -1;
int tries = 3;
int lookup_counter = 0;
-#ifdef ISC_PLATFORM_USESIT
static char sitvalue[256];
-#endif
#ifdef WITH_IDN
static void initialize_idn(void);
@@ -860,9 +858,7 @@ make_empty_lookup(void) {
#else
looknew->idnout = ISC_FALSE;
#endif
-#ifdef ISC_PLATFORM_USESIT
looknew->sit = ISC_FALSE;
-#endif
#ifdef DIG_SIGCHASE
looknew->sigchase = ISC_FALSE;
#if DIG_SIGCHASE_TD
@@ -900,9 +896,7 @@ make_empty_lookup(void) {
looknew->done_as_is = ISC_FALSE;
looknew->need_search = ISC_FALSE;
looknew->ecs_addr = NULL;
-#ifdef ISC_PLATFORM_USESIT
looknew->sitvalue = NULL;
-#endif
looknew->ednsopts = NULL;
looknew->ednsoptscnt = 0;
looknew->ednsneg = ISC_FALSE;
@@ -992,10 +986,8 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
looknew->opcode = lookold->opcode;
looknew->expire = lookold->expire;
looknew->nsid = lookold->nsid;
-#ifdef ISC_PLATFORM_USESIT
looknew->sit = lookold->sit;
looknew->sitvalue = lookold->sitvalue;
-#endif
if (lookold->ednsopts != NULL) {
cloneopts(looknew, lookold);
} else {
@@ -2319,14 +2311,12 @@ insert_soa(dig_lookup_t *lookup) {
dns_message_addname(lookup->sendmsg, soaname, DNS_SECTION_AUTHORITY);
}
-#ifdef ISC_PLATFORM_USESIT
static void
compute_cookie(unsigned char *clientcookie, size_t len) {
/* XXXMPA need to fix, should be per server. */
INSIST(len >= 8U);
memmove(clientcookie, cookie_secret, 8);
}
-#endif
/*%
* Setup the supplied lookup structure, making it ready to start sending
@@ -2345,9 +2335,7 @@ setup_lookup(dig_lookup_t *lookup) {
dns_compress_t cctx;
char store[MXNAME];
char ecsbuf[20];
-#ifdef ISC_PLATFORM_USESIT
char sitbuf[256];
-#endif
#ifdef WITH_IDN
idn_result_t mr;
char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME];
@@ -2718,7 +2706,6 @@ setup_lookup(dig_lookup_t *lookup) {
i++;
}
-#ifdef ISC_PLATFORM_USESIT
if (lookup->sit) {
INSIST(i < MAXOPTS);
opts[i].code = DNS_OPT_COOKIE;
@@ -2736,7 +2723,6 @@ setup_lookup(dig_lookup_t *lookup) {
}
i++;
}
-#endif
if (lookup->expire) {
INSIST(i < MAXOPTS);
@@ -3613,7 +3599,6 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
return (ISC_TRUE);
}
-#ifdef ISC_PLATFORM_USESIT
static void
process_sit(dig_lookup_t *l, dns_message_t *msg,
isc_buffer_t *optbuf, size_t optlen)
@@ -3705,7 +3690,6 @@ process_opt(dig_lookup_t *l, dns_message_t *msg) {
}
}
}
-#endif
static int
ednsvers(dns_rdataset_t *opt) {
@@ -4003,10 +3987,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0 &&
!l->ignore && !l->tcp_mode) {
-#ifdef ISC_PLATFORM_USESIT
if (l->sitvalue == NULL && l->sit && msg->opt != NULL)
process_opt(l, msg);
-#endif
if (l->comments)
printf(";; Truncated, retrying in TCP mode.\n");
n = requeue_lookup(l, ISC_TRUE);
@@ -4109,7 +4091,6 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
}
-#ifdef ISC_PLATFORM_USESIT
if (l->sitvalue != NULL) {
if (msg->opt == NULL)
printf(";; expected opt record in response\n");
@@ -4117,7 +4098,6 @@ recv_done(isc_task_t *task, isc_event_t *event) {
process_opt(l, msg);
} else if (l->sit && msg->opt != NULL)
process_opt(l, msg);
-#endif
if (!l->doing_xfr || l->xfr_q == query) {
if (msg->rcode == dns_rcode_nxdomain &&
diff --git a/usr.sbin/bind/bin/dig/include/dig/dig.h b/usr.sbin/bind/bin/dig/include/dig/dig.h
index c4a7ba477fe..0e93a989b40 100644
--- a/usr.sbin/bind/bin/dig/include/dig/dig.h
+++ b/usr.sbin/bind/bin/dig/include/dig/dig.h
@@ -129,9 +129,7 @@ struct dig_lookup {
besteffort,
dnssec,
expire,
-#ifdef ISC_PLATFORM_USESIT
sit,
-#endif
nsid, /*% Name Server ID (RFC 5001) */
ednsneg,
mapped,
@@ -189,9 +187,7 @@ isc_boolean_t sigchase;
isc_uint32_t msgcounter;
dns_fixedname_t fdomain;
isc_sockaddr_t *ecs_addr;
-#ifdef ISC_PLATFORM_USESIT
char *sitvalue;
-#endif
dns_ednsopt_t *ednsopts;
unsigned int ednsoptscnt;
unsigned int ednsflags;