Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29dac6841e | ||
|
|
b286e95651 | ||
|
|
21fdaf27ae | ||
|
|
dfbac62505 | ||
|
|
d421a55af1 | ||
|
|
bf683ca488 | ||
|
|
8672e10555 | ||
|
|
ce95589628 | ||
|
|
8c80816967 | ||
|
|
8a48375c12 | ||
|
|
f409b27b9f | ||
|
|
a44877bed3 |
@@ -1,3 +1,9 @@
|
||||
6051. [cleanup] Only two modules remained in libbind9 and one in
|
||||
libirs. The modules have been moved into the other
|
||||
libraries, and libbind9 and libirs have been removed.
|
||||
Several nugatory headers have been removed from libisc
|
||||
too. [GL !7244]
|
||||
|
||||
6050. [bug] Changes to the RPZ response-policy min-update-interval
|
||||
and add-soa options now take effect as expected when
|
||||
named is reconfigured. [GL #3740]
|
||||
|
||||
@@ -40,12 +40,6 @@ LIBNS_CFLAGS = \
|
||||
LIBNS_LIBS = \
|
||||
$(top_builddir)/lib/ns/libns.la
|
||||
|
||||
LIBIRS_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/irs/include
|
||||
|
||||
LIBIRS_LIBS = \
|
||||
$(top_builddir)/lib/irs/libirs.la
|
||||
|
||||
LIBISCCFG_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/isccfg/include
|
||||
|
||||
@@ -57,9 +51,3 @@ LIBISCCC_CFLAGS = \
|
||||
|
||||
LIBISCCC_LIBS = \
|
||||
$(top_builddir)/lib/isccc/libisccc.la
|
||||
|
||||
LIBBIND9_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/bind9/include
|
||||
|
||||
LIBBIND9_LIBS = \
|
||||
$(top_builddir)/lib/bind9/libbind9.la
|
||||
|
||||
@@ -4,8 +4,7 @@ AM_CPPFLAGS += \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS)
|
||||
$(LIBISCCFG_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
@@ -21,8 +20,7 @@ LDADD += \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBBIND9_LIBS)
|
||||
$(LIBISCCFG_LIBS)
|
||||
|
||||
bin_PROGRAMS = named-checkconf named-checkzone
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
/*! \file */
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <netdb.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -21,8 +22,6 @@
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/netdb.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stdio.h>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
@@ -37,11 +36,10 @@
|
||||
#include <dns/rootns.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
#include <isccfg/check.h>
|
||||
#include <isccfg/grammar.h>
|
||||
#include <isccfg/namedconf.h>
|
||||
|
||||
#include <bind9/check.h>
|
||||
|
||||
#include "check-tool.h"
|
||||
|
||||
static const char *program = "named-checkconf";
|
||||
@@ -735,7 +733,7 @@ main(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
|
||||
result = isccfg_check_namedconf(config, loadplugins, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
exit_status = 1;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/print.h>
|
||||
|
||||
extern bool verbose;
|
||||
extern const char *progname;
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@ AM_CPPFLAGS += \
|
||||
-I$(top_builddir)/include \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBIRS_CFLAGS)
|
||||
$(LIBISCCFG_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-DSYSCONFDIR=\"${sysconfdir}\"
|
||||
@@ -14,8 +13,8 @@ bin_PROGRAMS = delv
|
||||
|
||||
delv_SOURCES = \
|
||||
delv.c
|
||||
|
||||
delv_LDADD = \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBIRS_LIBS)
|
||||
$(LIBISCCFG_LIBS)
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -4,8 +4,6 @@ AM_CPPFLAGS += \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBIRS_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(LIBIDN2_CFLAGS) \
|
||||
$(LIBUV_CFLAGS)
|
||||
|
||||
@@ -14,8 +12,6 @@ LDADD += \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBIRS_LIBS) \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(LIBIDN2_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES = libdighost.la
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <isc/loop.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
|
||||
+6
-9
@@ -25,6 +25,7 @@
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <netdb.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -42,10 +43,8 @@
|
||||
#include <isc/loop.h>
|
||||
#include <isc/managers.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/netdb.h>
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/safe.h>
|
||||
@@ -81,8 +80,6 @@
|
||||
|
||||
#include <irs/resconf.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#include "dighost.h"
|
||||
|
||||
#define systemlocale(l) (void)setlocale(l, "")
|
||||
@@ -538,8 +535,8 @@ set_nameserver(char *opt) {
|
||||
}
|
||||
|
||||
isc_loopmgr_blocking(loopmgr);
|
||||
result = bind9_getaddresses(opt, 0, sockaddrs, DIG_MAX_ADDRESSES,
|
||||
&count);
|
||||
result = isc_sockaddr_fromtext(opt, 0, sockaddrs, DIG_MAX_ADDRESSES,
|
||||
&count);
|
||||
isc_loopmgr_nonblocking(loopmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("couldn't get address for '%s': %s", opt,
|
||||
@@ -4533,7 +4530,7 @@ get_address(char *host, in_port_t myport, isc_sockaddr_t *sockaddr) {
|
||||
isc_result_t result;
|
||||
|
||||
isc_loopmgr_blocking(loopmgr);
|
||||
result = bind9_getaddresses(host, myport, sockaddr, 1, &count);
|
||||
result = isc_sockaddr_fromtext(host, myport, sockaddr, 1, &count);
|
||||
isc_loopmgr_nonblocking(loopmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
@@ -4554,8 +4551,8 @@ getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp) {
|
||||
char tmp[ISC_NETADDR_FORMATSIZE];
|
||||
|
||||
isc_loopmgr_blocking(loopmgr);
|
||||
result = bind9_getaddresses(host, 0, sockaddrs, DIG_MAX_ADDRESSES,
|
||||
&count);
|
||||
result = isc_sockaddr_fromtext(host, 0, sockaddrs, DIG_MAX_ADDRESSES,
|
||||
&count);
|
||||
isc_loopmgr_nonblocking(loopmgr);
|
||||
if (resultp != NULL) {
|
||||
*resultp = result;
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/time.h>
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/loop.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <isc/loop.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <isc/dir.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <isc/heap.h>
|
||||
#include <isc/list.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
|
||||
@@ -7,7 +7,6 @@ AM_CPPFLAGS += \
|
||||
$(LIBNS_CFLAGS) \
|
||||
$(LIBISCCC_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(OPENSSL_CFLAGS) \
|
||||
$(LIBCAP_CFLAGS) \
|
||||
$(LMDB_CFLAGS) \
|
||||
@@ -103,7 +102,6 @@ named_LDADD = \
|
||||
$(LIBNS_LIBS) \
|
||||
$(LIBISCCC_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(OPENSSL_LIBS) \
|
||||
$(LIBCAP_LIBS) \
|
||||
$(LMDB_LIBS) \
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
||||
@@ -41,10 +41,9 @@
|
||||
#include <isccc/symtab.h>
|
||||
#include <isccc/util.h>
|
||||
|
||||
#include <isccfg/check.h>
|
||||
#include <isccfg/namedconf.h>
|
||||
|
||||
#include <bind9/check.h>
|
||||
|
||||
#include <named/config.h>
|
||||
#include <named/control.h>
|
||||
#include <named/log.h>
|
||||
@@ -849,7 +848,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
|
||||
CHECK(ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
CHECK(bind9_check_key(key, named_g_lctx));
|
||||
CHECK(isccfg_check_key(key, named_g_lctx));
|
||||
|
||||
(void)cfg_map_get(key, "algorithm", &algobj);
|
||||
(void)cfg_map_get(key, "secret", &secretobj);
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
#include <isc/uv.h>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#endif /* if defined(HAVE_GEOIP2) */
|
||||
|
||||
#include <isc/dir.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
||||
+4
-6
@@ -17,8 +17,6 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <isc/file.h>
|
||||
#include <isc/offset.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
@@ -146,14 +144,14 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
|
||||
const cfg_obj_t *suffixobj = cfg_tuple_get(fileobj, "suffix");
|
||||
int32_t versions = ISC_LOG_ROLLNEVER;
|
||||
isc_log_rollsuffix_t suffix = isc_log_rollsuffix_increment;
|
||||
isc_offset_t size = 0;
|
||||
off_t size = 0;
|
||||
uint64_t maxoffset;
|
||||
|
||||
/*
|
||||
* isc_offset_t is a signed integer type, so the maximum
|
||||
* off_t is a signed integer type, so the maximum
|
||||
* value is all 1s except for the MSB.
|
||||
*/
|
||||
switch (sizeof(isc_offset_t)) {
|
||||
switch (sizeof(off_t)) {
|
||||
case 4:
|
||||
maxoffset = 0x7fffffffULL;
|
||||
break;
|
||||
@@ -178,7 +176,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
|
||||
if (sizeobj != NULL && cfg_obj_isuint64(sizeobj) &&
|
||||
cfg_obj_asuint64(sizeobj) < maxoffset)
|
||||
{
|
||||
size = (isc_offset_t)cfg_obj_asuint64(sizeobj);
|
||||
size = (off_t)cfg_obj_asuint64(sizeobj);
|
||||
}
|
||||
if (suffixobj != NULL && cfg_obj_isstring(suffixobj) &&
|
||||
strcasecmp(cfg_obj_asstring(suffixobj), "timestamp") == 0)
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <isc/managers.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/signal.h>
|
||||
#include <isc/stdio.h>
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/strerr.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
+3
-6
@@ -50,12 +50,10 @@
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/portset.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/signal.h>
|
||||
#include <isc/siphash.h>
|
||||
#include <isc/stat.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
@@ -111,6 +109,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include <isccfg/check.h>
|
||||
#include <isccfg/grammar.h>
|
||||
#include <isccfg/kaspconf.h>
|
||||
#include <isccfg/namedconf.h>
|
||||
@@ -120,8 +119,6 @@
|
||||
#include <ns/interfacemgr.h>
|
||||
#include <ns/listenlist.h>
|
||||
|
||||
#include <bind9/check.h>
|
||||
|
||||
#include <named/config.h>
|
||||
#include <named/control.h>
|
||||
#if defined(HAVE_GEOIP2)
|
||||
@@ -8437,8 +8434,8 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
* checked later when the modules are actually loaded and
|
||||
* registered.)
|
||||
*/
|
||||
result = bind9_check_namedconf(config, false, named_g_lctx,
|
||||
named_g_mctx);
|
||||
result = isccfg_check_namedconf(config, false, named_g_lctx,
|
||||
named_g_mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_config;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <isc/httpd.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -4,8 +4,6 @@ AM_CPPFLAGS += \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBIRS_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(GSSAPI_CFLAGS) \
|
||||
$(KRB5_CFLAGS) \
|
||||
$(READLINE_CFLAGS)
|
||||
@@ -17,8 +15,6 @@ LDADD += \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBIRS_LIBS) \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(GSSAPI_LIBS) \
|
||||
$(KRB5_LIBS)
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/portset.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
@@ -95,8 +94,6 @@
|
||||
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#include "../dig/readline.h"
|
||||
|
||||
#define MAXCMD (128 * 1024)
|
||||
@@ -108,7 +105,7 @@
|
||||
|
||||
#define DNSDEFAULTPORT 53
|
||||
|
||||
/* Number of addresses to request from bind9_getaddresses() */
|
||||
/* Number of addresses to request from isc_sockaddr_fromtext() */
|
||||
#define MAX_SERVERADDRS 4
|
||||
|
||||
static uint16_t dnsport = DNSDEFAULTPORT;
|
||||
@@ -1017,7 +1014,7 @@ get_addresses(char *host, in_port_t port, isc_sockaddr_t *sockaddr,
|
||||
isc_result_t result;
|
||||
|
||||
isc_loopmgr_blocking(loopmgr);
|
||||
result = bind9_getaddresses(host, port, sockaddr, naddrs, &count);
|
||||
result = isc_sockaddr_fromtext(host, port, sockaddr, naddrs, &count);
|
||||
isc_loopmgr_nonblocking(loopmgr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
error("couldn't get address for '%s': %s", host,
|
||||
|
||||
@@ -4,8 +4,7 @@ AM_CPPFLAGS += \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBISCCC_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS)
|
||||
$(LIBISCCC_CFLAGS)
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
-DRNDC_CONFFILE=\"${sysconfdir}/rndc.conf\" \
|
||||
@@ -22,5 +21,4 @@ rndc_LDADD = \
|
||||
$(LIBISC_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISCCC_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBBIND9_LIBS)
|
||||
$(LIBISCCFG_LIBS)
|
||||
|
||||
+1
-4
@@ -28,7 +28,6 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
@@ -50,8 +49,6 @@
|
||||
|
||||
#include <isccfg/namedconf.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#define SERVERADDRS 10
|
||||
@@ -282,7 +279,7 @@ get_addresses(const char *host, in_port_t port) {
|
||||
}
|
||||
} else {
|
||||
count = SERVERADDRS - nserveraddrs;
|
||||
result = bind9_getaddresses(
|
||||
result = isc_sockaddr_fromtext(
|
||||
host, port, &serveraddrs[nserveraddrs], count, &found);
|
||||
nserveraddrs += found;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/print.h>
|
||||
|
||||
extern bool verbose;
|
||||
extern const char *progname;
|
||||
|
||||
|
||||
@@ -575,8 +575,6 @@ static dns_dbmethods_t sampledb_methods = {
|
||||
getoriginnode, transfernode, getnsec3parameters,
|
||||
findnsec3node, setsigningtime, getsigningtime,
|
||||
resigned, isdnssec, getrrsetstats,
|
||||
NULL, /* rpz_attach */
|
||||
NULL, /* rpz_ready */
|
||||
findnodeext, findext, setcachestats,
|
||||
hashsize, NULL, /* nodefullname */
|
||||
NULL, /* getsize */
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <isc/net.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/edns.h>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <isc/net.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/task.h>
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <isc/print.h>
|
||||
|
||||
#define USAGE "usage: gencheck <filename>\n"
|
||||
|
||||
static int
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <isc/print.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#ifdef USE_DNSRPS
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <isc/managers.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -18,16 +18,6 @@ bin_PROGRAMS = \
|
||||
arpaname_LDADD = \
|
||||
$(LIBISC_LIBS)
|
||||
|
||||
mdig_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
$(LIBBIND9_CFLAGS)
|
||||
|
||||
mdig_LDADD = \
|
||||
$(LIBBIND9_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISC_LIBS)
|
||||
|
||||
if HAVE_DNSTAP
|
||||
bin_PROGRAMS += \
|
||||
dnstap-read
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <isc/net.h>
|
||||
#include <isc/print.h>
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/hex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
+1
-4
@@ -30,7 +30,6 @@
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/portset.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
@@ -54,8 +53,6 @@
|
||||
#include <dns/types.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#define CHECK(str, x) \
|
||||
{ \
|
||||
if ((x) != ISC_R_SUCCESS) { \
|
||||
@@ -2138,7 +2135,7 @@ main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
ns = 0;
|
||||
result = bind9_getaddresses(server, port, &dstaddr, 1, &ns);
|
||||
result = isc_sockaddr_fromtext(server, port, &dstaddr, 1, &ns);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("couldn't get address for '%s': %s", server,
|
||||
isc_result_totext(result));
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/print.h>
|
||||
|
||||
#include <dns/view.h>
|
||||
|
||||
int
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/lex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/hex.h>
|
||||
#include <isc/iterated_hash.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
+1
-3
@@ -1586,10 +1586,8 @@ AC_CONFIG_FILES([lib/Makefile
|
||||
lib/isc/Makefile
|
||||
lib/dns/Makefile
|
||||
lib/ns/Makefile
|
||||
lib/irs/Makefile
|
||||
lib/isccfg/Makefile
|
||||
lib/isccc/Makefile
|
||||
lib/bind9/Makefile])
|
||||
lib/isccc/Makefile])
|
||||
|
||||
# Documentation
|
||||
|
||||
|
||||
+1
-6
@@ -268,15 +268,10 @@ libraries.
|
||||
* `bind9/lib/dns`: implements higher-level DNS functionality:
|
||||
red-black trees, rdatasets, views, zones, ACLs, resolver, validator, etc
|
||||
* `bind9/lib/dns/tests`: unit tests for libdns
|
||||
* `bind9/lib/bind9`: library implementing bind9-specific functionality,
|
||||
principally configuration validity checking (used in `named` and
|
||||
`named-checkconf` when reading `named.conf`).
|
||||
* `bind9/lib/isccfg`: library implementing the `named.conf`
|
||||
configuration parser.
|
||||
configuration parser and checker.
|
||||
* `bind9/lib/isccc`: library implementing the control channel used
|
||||
by `rndc`
|
||||
* `bind9/lib/irs`: provides mechanisms for reading `/etc/resolv.conf`
|
||||
and other configuration files.
|
||||
|
||||
#### Namespace
|
||||
|
||||
|
||||
@@ -475,7 +475,6 @@ INPUT = @BIND9_TOP_BUILDDIR@/lib/isc \
|
||||
@BIND9_TOP_BUILDDIR@/lib/isccfg \
|
||||
@BIND9_TOP_BUILDDIR@/lib/isccc \
|
||||
@BIND9_TOP_BUILDDIR@/lib/ns \
|
||||
@BIND9_TOP_BUILDDIR@/lib/bind9 \
|
||||
@BIND9_TOP_BUILDDIR@/bin/check \
|
||||
@BIND9_TOP_BUILDDIR@/bin/dig \
|
||||
@BIND9_TOP_BUILDDIR@/bin/dnssec \
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/lex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
SUBDIRS = isc dns isccc ns isccfg bind9 irs
|
||||
SUBDIRS = isc dns isccc ns isccfg
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
include $(top_srcdir)/Makefile.top
|
||||
|
||||
lib_LTLIBRARIES = libbind9.la
|
||||
|
||||
libbind9_ladir = $(includedir)/bind9
|
||||
libbind9_la_HEADERS = \
|
||||
include/bind9/check.h \
|
||||
include/bind9/getaddresses.h
|
||||
|
||||
libbind9_la_SOURCES = \
|
||||
$(libbind9_la_HEADERS) \
|
||||
check.c \
|
||||
getaddresses.c
|
||||
|
||||
libbind9_la_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
$(LIBISC_CFLAGS) \
|
||||
$(LIBDNS_CFLAGS) \
|
||||
$(LIBISCCFG_CFLAGS) \
|
||||
$(LIBNS_CFLAGS) \
|
||||
$(LIBBIND9_CFLAGS) \
|
||||
$(OPENSSL_CFLAGS)
|
||||
|
||||
libbind9_la_LIBADD = \
|
||||
$(LIBNS_LIBS) \
|
||||
$(LIBISCCFG_LIBS) \
|
||||
$(LIBDNS_LIBS) \
|
||||
$(LIBISC_LIBS)
|
||||
|
||||
libbind9_la_LDFLAGS = \
|
||||
$(AM_LDFLAGS) \
|
||||
-release "$(PACKAGE_VERSION)"
|
||||
|
||||
if HAVE_DNSTAP
|
||||
libbind9_la_CPPFLAGS += $(DNSTAP_CFLAGS)
|
||||
endif
|
||||
@@ -1,164 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/net.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/netdb.h>
|
||||
#include <isc/netscope.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
isc_result_t
|
||||
bind9_getaddresses(const char *hostname, in_port_t port, isc_sockaddr_t *addrs,
|
||||
int addrsize, int *addrcount) {
|
||||
struct in_addr in4;
|
||||
struct in6_addr in6;
|
||||
bool have_ipv4, have_ipv6;
|
||||
int i;
|
||||
|
||||
struct addrinfo *ai = NULL, *tmpai, hints;
|
||||
int result;
|
||||
|
||||
REQUIRE(hostname != NULL);
|
||||
REQUIRE(addrs != NULL);
|
||||
REQUIRE(addrcount != NULL);
|
||||
REQUIRE(addrsize > 0);
|
||||
|
||||
have_ipv4 = (isc_net_probeipv4() == ISC_R_SUCCESS);
|
||||
have_ipv6 = (isc_net_probeipv6() == ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* Try IPv4, then IPv6. In order to handle the extended format
|
||||
* for IPv6 scoped addresses (address%scope_ID), we'll use a local
|
||||
* working buffer of 128 bytes. The length is an ad-hoc value, but
|
||||
* should be enough for this purpose; the buffer can contain a string
|
||||
* of at least 80 bytes for scope_ID in addition to any IPv6 numeric
|
||||
* addresses (up to 46 bytes), the delimiter character and the
|
||||
* terminating NULL character.
|
||||
*/
|
||||
if (inet_pton(AF_INET, hostname, &in4) == 1) {
|
||||
if (have_ipv4) {
|
||||
isc_sockaddr_fromin(&addrs[0], &in4, port);
|
||||
} else {
|
||||
isc_sockaddr_v6fromin(&addrs[0], &in4, port);
|
||||
}
|
||||
*addrcount = 1;
|
||||
return (ISC_R_SUCCESS);
|
||||
} else if (strlen(hostname) <= 127U) {
|
||||
char tmpbuf[128], *d;
|
||||
uint32_t zone = 0;
|
||||
|
||||
strlcpy(tmpbuf, hostname, sizeof(tmpbuf));
|
||||
d = strchr(tmpbuf, '%');
|
||||
if (d != NULL) {
|
||||
*d = '\0';
|
||||
}
|
||||
|
||||
if (inet_pton(AF_INET6, tmpbuf, &in6) == 1) {
|
||||
isc_netaddr_t na;
|
||||
|
||||
if (!have_ipv6) {
|
||||
return (ISC_R_FAMILYNOSUPPORT);
|
||||
}
|
||||
|
||||
if (d != NULL) {
|
||||
isc_result_t iresult;
|
||||
|
||||
iresult = isc_netscope_pton(AF_INET6, d + 1,
|
||||
&in6, &zone);
|
||||
|
||||
if (iresult != ISC_R_SUCCESS) {
|
||||
return (iresult);
|
||||
}
|
||||
}
|
||||
|
||||
isc_netaddr_fromin6(&na, &in6);
|
||||
isc_netaddr_setzone(&na, zone);
|
||||
isc_sockaddr_fromnetaddr(
|
||||
&addrs[0], (const isc_netaddr_t *)&na, port);
|
||||
|
||||
*addrcount = 1;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
if (!have_ipv6) {
|
||||
hints.ai_family = PF_INET;
|
||||
} else if (!have_ipv4) {
|
||||
hints.ai_family = PF_INET6;
|
||||
} else {
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
#ifdef AI_ADDRCONFIG
|
||||
hints.ai_flags = AI_ADDRCONFIG;
|
||||
#endif /* ifdef AI_ADDRCONFIG */
|
||||
}
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
#ifdef AI_ADDRCONFIG
|
||||
again:
|
||||
#endif /* ifdef AI_ADDRCONFIG */
|
||||
result = getaddrinfo(hostname, NULL, &hints, &ai);
|
||||
switch (result) {
|
||||
case 0:
|
||||
break;
|
||||
case EAI_NONAME:
|
||||
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
|
||||
case EAI_NODATA:
|
||||
#endif /* if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) */
|
||||
return (ISC_R_NOTFOUND);
|
||||
#ifdef AI_ADDRCONFIG
|
||||
case EAI_BADFLAGS:
|
||||
if ((hints.ai_flags & AI_ADDRCONFIG) != 0) {
|
||||
hints.ai_flags &= ~AI_ADDRCONFIG;
|
||||
goto again;
|
||||
}
|
||||
#endif /* ifdef AI_ADDRCONFIG */
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
for (tmpai = ai, i = 0; tmpai != NULL && i < addrsize;
|
||||
tmpai = tmpai->ai_next)
|
||||
{
|
||||
if (tmpai->ai_family != AF_INET && tmpai->ai_family != AF_INET6)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (tmpai->ai_family == AF_INET) {
|
||||
struct sockaddr_in *sin;
|
||||
sin = (struct sockaddr_in *)tmpai->ai_addr;
|
||||
isc_sockaddr_fromin(&addrs[i], &sin->sin_addr, port);
|
||||
} else {
|
||||
struct sockaddr_in6 *sin6;
|
||||
sin6 = (struct sockaddr_in6 *)tmpai->ai_addr;
|
||||
isc_sockaddr_fromin6(&addrs[i], &sin6->sin6_addr, port);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
freeaddrinfo(ai);
|
||||
*addrcount = i;
|
||||
if (*addrcount == 0) {
|
||||
return (ISC_R_NOTFOUND);
|
||||
} else {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
../../../.clang-format.headers
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/*! \file bind9/getaddresses.h */
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
bind9_getaddresses(const char *hostname, in_port_t port, isc_sockaddr_t *addrs,
|
||||
int addrsize, int *addrcount);
|
||||
/*%<
|
||||
* Use the system resolver to get the addresses associated with a hostname.
|
||||
* If successful, the number of addresses found is returned in 'addrcount'.
|
||||
* If a hostname lookup is performed and addresses of an unknown family is
|
||||
* seen, it is ignored. If more than 'addrsize' addresses are seen, the
|
||||
* first 'addrsize' are returned and the remainder silently truncated.
|
||||
*
|
||||
* This routine may block. If called by a program using the isc_loopmgr
|
||||
* framework, it should be surrounded by isc_loopmgr_blocking() and
|
||||
* isc_loopmgr_nonblocking().
|
||||
*
|
||||
* Requires:
|
||||
*\li 'hostname' is not NULL.
|
||||
*\li 'addrs' is not NULL.
|
||||
*\li 'addrsize' > 0
|
||||
*\li 'addrcount' is not NULL.
|
||||
*
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOTFOUND
|
||||
*\li #ISC_R_FAMILYNOSUPPORT - 'hostname' is an IPv6 address, and IPv6 is
|
||||
* not supported.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
@@ -143,9 +143,14 @@ dst_HEADERS = \
|
||||
include/dst/dst.h \
|
||||
include/dst/gssapi.h
|
||||
|
||||
irsdir = $(includedir)/irs
|
||||
irs_HEADERS = \
|
||||
include/irs/resconf.h
|
||||
|
||||
libdns_la_SOURCES = \
|
||||
$(libdns_la_HEADERS) \
|
||||
$(dst_HEADERS) \
|
||||
$(irs_HEADERS) \
|
||||
acl.c \
|
||||
adb.c \
|
||||
badcache.c \
|
||||
@@ -212,6 +217,7 @@ libdns_la_SOURCES = \
|
||||
rdatasetiter.c \
|
||||
rdataslab.c \
|
||||
request.c \
|
||||
resconf.c \
|
||||
resolver.c \
|
||||
result.c \
|
||||
rootns.c \
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <isc/loop.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stats.h>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <isc/loop.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stats.h>
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <isc/print.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/callbacks.h>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <isc/md.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -975,28 +975,6 @@ dns_db_resigned(dns_db_t *db, dns_rdataset_t *rdataset,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach a database to policy zone databases.
|
||||
* This should only happen when the caller has already ensured that
|
||||
* it is dealing with a database that understands response policy zones.
|
||||
*/
|
||||
void
|
||||
dns_db_rpz_attach(dns_db_t *db, void *rpzs, uint8_t rpz_num) {
|
||||
REQUIRE(db->methods->rpz_attach != NULL);
|
||||
(db->methods->rpz_attach)(db, rpzs, rpz_num);
|
||||
}
|
||||
|
||||
/*
|
||||
* Finish loading a response policy zone.
|
||||
*/
|
||||
isc_result_t
|
||||
dns_db_rpz_ready(dns_db_t *db) {
|
||||
if (db->methods->rpz_ready == NULL) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
return ((db->methods->rpz_ready)(db));
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach a notify-on-update function the database
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <isc/net.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/portset.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -965,8 +965,6 @@ static dns_dbmethods_t rpsdb_db_methods = {
|
||||
NULL, /* resigned */
|
||||
NULL, /* isdnssec */
|
||||
NULL, /* getrrsetstats */
|
||||
NULL, /* rpz_attach */
|
||||
NULL, /* rpz_ready */
|
||||
NULL, /* findnodeext */
|
||||
NULL, /* findext */
|
||||
NULL, /* setcachestats */
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
+1
-2
@@ -60,7 +60,6 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/task.h>
|
||||
@@ -118,7 +117,7 @@ struct dns_dtenv {
|
||||
isc_region_t version;
|
||||
char *path;
|
||||
dns_dtmode_t mode;
|
||||
isc_offset_t max_size;
|
||||
off_t max_size;
|
||||
int rolls;
|
||||
isc_log_rollsuffix_t suffix;
|
||||
isc_stats_t *stats;
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <isc/lex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/safe.h>
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <isc/fsaccess.h>
|
||||
#include <isc/lex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/stdtime.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/ecs.h>
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <isc/base64.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#include <isc/lex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <isc/deprecated.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/magic.h>
|
||||
#include <isc/stats.h>
|
||||
@@ -159,8 +158,6 @@ typedef struct dns_dbmethods {
|
||||
dns_dbversion_t *version);
|
||||
bool (*isdnssec)(dns_db_t *db);
|
||||
dns_stats_t *(*getrrsetstats)(dns_db_t *db);
|
||||
void (*rpz_attach)(dns_db_t *db, void *rpzs, uint8_t rpz_num);
|
||||
isc_result_t (*rpz_ready)(dns_db_t *db);
|
||||
isc_result_t (*findnodeext)(dns_db_t *db, const dns_name_t *name,
|
||||
bool create,
|
||||
dns_clientinfomethods_t *methods,
|
||||
@@ -1626,19 +1623,6 @@ dns_db_setcachestats(dns_db_t *db, isc_stats_t *stats);
|
||||
* dns_rdatasetstats_create(); otherwise NULL.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_db_rpz_attach(dns_db_t *db, void *rpzs, uint8_t rpz_num) ISC_DEPRECATED;
|
||||
/*%<
|
||||
* Attach the response policy information for a view to a database for a
|
||||
* zone for the view.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_db_rpz_ready(dns_db_t *db) ISC_DEPRECATED;
|
||||
/*%<
|
||||
* Finish loading a response policy zone.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_db_updatenotify_register(dns_db_t *db, dns_dbupdate_callback_t fn,
|
||||
void *fn_arg);
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <isc/deprecated.h>
|
||||
#include <isc/event.h>
|
||||
#include <isc/ht.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
+9
-10
@@ -20,7 +20,6 @@
|
||||
#include <isc/dir.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/stdio.h>
|
||||
@@ -184,7 +183,7 @@ typedef struct {
|
||||
unsigned char serial[4]; /*%< SOA serial before update. */
|
||||
/*
|
||||
* XXXRTH Should offset be 8 bytes?
|
||||
* XXXDCL ... probably, since isc_offset_t is 8 bytes on many OSs.
|
||||
* XXXDCL ... probably, since off_t is 8 bytes on many OSs.
|
||||
* XXXAG ... but we will not be able to seek >2G anyway on many
|
||||
* platforms as long as we are using fseek() rather
|
||||
* than lseek().
|
||||
@@ -259,7 +258,7 @@ typedef struct {
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t serial;
|
||||
isc_offset_t offset;
|
||||
off_t offset;
|
||||
} journal_pos_t;
|
||||
|
||||
#define POS_VALID(pos) ((pos).offset != 0)
|
||||
@@ -330,7 +329,7 @@ struct dns_journal {
|
||||
* while reading the journal */
|
||||
char *filename; /*%< Journal file name */
|
||||
FILE *fp; /*%< File handle */
|
||||
isc_offset_t offset; /*%< Current file offset */
|
||||
off_t offset; /*%< Current file offset */
|
||||
journal_xhdr_t curxhdr; /*%< Current transaction header */
|
||||
journal_header_t header; /*%< In-core journal header */
|
||||
unsigned char *rawindex; /*%< In-core buffer for journal index
|
||||
@@ -441,7 +440,7 @@ journal_read(dns_journal_t *j, void *mem, size_t nbytes) {
|
||||
isc_result_totext(result));
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
j->offset += (isc_offset_t)nbytes;
|
||||
j->offset += (off_t)nbytes;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -456,7 +455,7 @@ journal_write(dns_journal_t *j, void *mem, size_t nbytes) {
|
||||
isc_result_totext(result));
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
j->offset += (isc_offset_t)nbytes;
|
||||
j->offset += (off_t)nbytes;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -857,7 +856,7 @@ ixfr_order(const void *av, const void *bv) {
|
||||
|
||||
static isc_result_t
|
||||
maybe_fixup_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr, uint32_t serial,
|
||||
isc_offset_t offset) {
|
||||
off_t offset) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
/*
|
||||
@@ -990,7 +989,7 @@ journal_next(dns_journal_t *j, journal_pos_t *pos) {
|
||||
? sizeof(journal_rawxhdr_t)
|
||||
: sizeof(journal_rawxhdr_ver1_t);
|
||||
|
||||
if ((isc_offset_t)(pos->offset + hdrsize + xhdr.size) < pos->offset) {
|
||||
if ((off_t)(pos->offset + hdrsize + xhdr.size) < pos->offset) {
|
||||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: offset too large", j->filename);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
@@ -1367,7 +1366,7 @@ dns_journal_commit(dns_journal_t *j) {
|
||||
CHECK(journal_fsync(j));
|
||||
|
||||
if (j->state == JOURNAL_STATE_TRANSACTION) {
|
||||
isc_offset_t offset;
|
||||
off_t offset;
|
||||
offset = (j->x.pos[1].offset - j->x.pos[0].offset) -
|
||||
(j->header_ver1 ? sizeof(journal_rawxhdr_ver1_t)
|
||||
: sizeof(journal_rawxhdr_t));
|
||||
@@ -2621,7 +2620,7 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial,
|
||||
*/
|
||||
while (rewrite && len > 0) {
|
||||
journal_xhdr_t xhdr;
|
||||
isc_offset_t offset = j1->offset;
|
||||
off_t offset = j1->offset;
|
||||
uint32_t count;
|
||||
|
||||
result = journal_read_xhdr(j1, &xhdr);
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <isc/loop.h>
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/serial.h>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user