summaryrefslogtreecommitdiffstats
path: root/lib/export
diff options
context:
space:
mode:
Diffstat (limited to 'lib/export')
-rw-r--r--lib/export/dns/Makefile.in8
-rw-r--r--lib/export/irs/Makefile.in5
-rw-r--r--lib/export/isc/Makefile.in15
-rw-r--r--lib/export/isc/include/isc/Makefile.in4
-rw-r--r--lib/export/isc/nls/Makefile.in2
-rw-r--r--lib/export/isc/nothreads/Makefile.in2
-rw-r--r--lib/export/isc/pthreads/Makefile.in2
-rw-r--r--lib/export/isc/unix/Makefile.in2
-rw-r--r--lib/export/isccfg/Makefile.in4
-rw-r--r--lib/export/samples/Makefile.in5
-rw-r--r--lib/export/samples/nsprobe.c28
-rw-r--r--lib/export/samples/sample-async.c4
-rw-r--r--lib/export/samples/sample-gai.c6
-rw-r--r--lib/export/samples/sample-request.c12
-rw-r--r--lib/export/samples/sample-update.c6
-rw-r--r--lib/export/samples/sample.c24
16 files changed, 73 insertions, 56 deletions
diff --git a/lib/export/dns/Makefile.in b/lib/export/dns/Makefile.in
index 6df36fe..f575f86 100644
--- a/lib/export/dns/Makefile.in
+++ b/lib/export/dns/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009-2013 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -43,8 +43,9 @@ LIBS = @LIBS@
# Alphabetically
+OPENSSLGOSTLINKOBJS = opensslgost_link.@O@
OPENSSLLINKOBJS = openssl_link.@O@ openssldh_link.@O@ openssldsa_link.@O@ \
- opensslecdsa_link.@O@ opensslgost_link.@O@ opensslrsa_link.@O@
+ opensslecdsa_link.@O@ @OPENSSLGOSTLINKOBJS@ opensslrsa_link.@O@
DSTOBJS = @OPENSSLLINKOBJS@ \
dst_api.@O@ dst_lib.@O@ dst_parse.@O@ dst_result.@O@ \
@@ -71,8 +72,9 @@ OBJS= ${DNSOBJS} ${OTHEROBJS} ${DSTOBJS} ${PORTDNSOBJS}
# Alphabetically
+OPENSSLGOSTLINKSRCS = opensslgost_link.c
OPENSSLLINKSRCS = openssl_link.c openssldh_link.c openssldsa_link.c \
- opensslecdsa_link.c opensslgost_link.c opensslrsa_link.c
+ opensslecdsa_link.c @OPENSSLGOSTLINKSRCS@ opensslrsa_link.c
DSTSRCS = @OPENSSLLINKSRCS@ \
dst_api.c dst_lib.c dst_parse.c \
diff --git a/lib/export/irs/Makefile.in b/lib/export/irs/Makefile.in
index 2cbc0bb..b2520f9 100644
--- a/lib/export/irs/Makefile.in
+++ b/lib/export/irs/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2011-2013 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -24,8 +24,9 @@ export_srcdir = @top_srcdir@/lib/export
@BIND9_MAKE_INCLUDES@
-CINCLUDES = -I. -I./include -I${srcdir}/include \
+CINCLUDES = -I. -I./include -I${srcdir}/include -I ../../irs/include \
${ISCCFG_INCLUDES} -I../dns/include ${DNS_INCLUDES} \
+ -I../dns/include ${DNS_INCLUDES} \
-I${export_srcdir}/isc/include ${ISC_INCLUDES}
CDEFINES =
CWARNINGS =
diff --git a/lib/export/isc/Makefile.in b/lib/export/isc/Makefile.in
index 86726ab..c04a907 100644
--- a/lib/export/isc/Makefile.in
+++ b/lib/export/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010, 2012 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2010, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -67,12 +67,11 @@ OBJS = @ISC_EXTRA_OBJS@ \
error.@O@ event.@O@ \
hash.@O@ hex.@O@ hmacmd5.@O@ hmacsha.@O@ \
inet_aton.@O@ iterated_hash.@O@ lex.@O@ lfsr.@O@ log.@O@ \
- md5.@O@ mutexblock.@O@ \
- netaddr.@O@ netscope.@O@ \
- ondestroy.@O@ \
- parseint.@O@ portset.@O@ radix.@O@ \
- random.@O@ refcount.@O@ region.@O@ result.@O@ rwlock.@O@ \
- serial.@O@ sha1.@O@ sha2.@O@ sockaddr.@O@ stats.@O@ string.@O@ \
+ md5.@O@ mutexblock.@O@ netaddr.@O@ netscope.@O@ \
+ ondestroy.@O@ parseint.@O@ portset.@O@ radix.@O@ \
+ random.@O@ refcount.@O@ region.@O@ regex.@O@ result.@O@ \
+ rwlock.@O@ serial.@O@ sha1.@O@ sha2.@O@ sockaddr.@O@ \
+ stats.@O@ string.@O@ \
symtab.@O@ \
version.@O@ \
${APIOBJS} ${ISCDRIVEROBJS} \
@@ -94,7 +93,7 @@ SRCS = @ISC_EXTRA_SRCS@ \
netaddr.c netscope.c \
ondestroy.c \
parseint.c portset.c radix.c \
- random.c refcount.c region.c result.c rwlock.c \
+ random.c refcount.c region.c regex.c result.c rwlock.c \
serial.c sha1.c sha2.c sockaddr.c stats.c string.c symtab.c \
version.c \
${APISRCS} ${ISCDRIVERSRCS}
diff --git a/lib/export/isc/include/isc/Makefile.in b/lib/export/isc/include/isc/Makefile.in
index 91f538c..8c7eff8 100644
--- a/lib/export/isc/include/isc/Makefile.in
+++ b/lib/export/isc/include/isc/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -35,7 +35,7 @@ HEADERS = app.h assertions.h base64.h bitstring.h boolean.h \
magic.h md5.h mem.h msgcat.h msgs.h \
mutexblock.h namespace.h netaddr.h ondestroy.h os.h parseint.h \
print.h quota.h radix.h random.h ratelimiter.h \
- refcount.h region.h resource.h \
+ refcount.h regex.h region.h resource.h \
result.h resultclass.h rwlock.h serial.h sha1.h sha2.h \
sockaddr.h socket.h stdio.h stdlib.h string.h \
symtab.h \
diff --git a/lib/export/isc/nls/Makefile.in b/lib/export/isc/nls/Makefile.in
index 2515685..16a6a86 100644
--- a/lib/export/isc/nls/Makefile.in
+++ b/lib/export/isc/nls/Makefile.in
@@ -16,10 +16,12 @@
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/isc/nls
+export_srcdir = @top_srcdir@/lib/export
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/unix/include \
+ -I${export_srcdir}/isc/include \
${ISC_INCLUDES}
CDEFINES =
diff --git a/lib/export/isc/nothreads/Makefile.in b/lib/export/isc/nothreads/Makefile.in
index 994da63..4640993 100644
--- a/lib/export/isc/nothreads/Makefile.in
+++ b/lib/export/isc/nothreads/Makefile.in
@@ -16,11 +16,13 @@
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/isc/nothreads
+export_srcdir = @top_srcdir@/lib/export
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include \
-I${srcdir}/../unix/include \
+ -I${export_srcdir}/isc/include \
-I../include \
-I${srcdir}/../include \
-I${srcdir}/..
diff --git a/lib/export/isc/pthreads/Makefile.in b/lib/export/isc/pthreads/Makefile.in
index f08e5c6..80c5e3b 100644
--- a/lib/export/isc/pthreads/Makefile.in
+++ b/lib/export/isc/pthreads/Makefile.in
@@ -16,11 +16,13 @@
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/isc/pthreads
+export_srcdir = @top_srcdir@/lib/export
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include \
-I${srcdir}/../unix/include \
+ -I${export_srcdir}/isc/include \
-I../include \
-I${srcdir}/../include \
-I${srcdir}/..
diff --git a/lib/export/isc/unix/Makefile.in b/lib/export/isc/unix/Makefile.in
index f5cf7e8..1873202 100644
--- a/lib/export/isc/unix/Makefile.in
+++ b/lib/export/isc/unix/Makefile.in
@@ -16,11 +16,13 @@
top_srcdir = @top_srcdir@
srcdir = @top_srcdir@/lib/isc/unix
+export_srcdir = @top_srcdir@/lib/export
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include \
-I${srcdir}/../@ISC_THREAD_DIR@/include \
+ -I${export_srcdir}/isc/include \
-I../include \
-I${srcdir}/../include \
-I${srcdir}/..
diff --git a/lib/export/isccfg/Makefile.in b/lib/export/isccfg/Makefile.in
index 907af50..2a791a4 100644
--- a/lib/export/isccfg/Makefile.in
+++ b/lib/export/isccfg/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2011-2013 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -31,7 +31,7 @@ CDEFINES =
CWARNINGS =
ISCLIBS = ../isc/libisc.@A@
-DNSLIBS = ../dns/libdns.@A@
+DNSLIBS = ../dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
ISCCFGDEPLIBS = libisccfg.@A@
diff --git a/lib/export/samples/Makefile.in b/lib/export/samples/Makefile.in
index cdc66b1..194aaeb 100644
--- a/lib/export/samples/Makefile.in
+++ b/lib/export/samples/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -25,7 +25,8 @@ export_srcdir = @top_srcdir@/lib/export
CINCLUDES = -I${srcdir}/include -I../dns/include \
-I${export_srcdir}/isc/include \
${DNS_INCLUDES} ${ISC_INCLUDES} \
- -I${top_srcdir}/lib/irs/include
+ -I${top_srcdir}/lib/irs/include \
+ -I../../irs/include
CDEFINES =
CWARNINGS =
diff --git a/lib/export/samples/nsprobe.c b/lib/export/samples/nsprobe.c
index 869b194..1d7ed3b 100644
--- a/lib/export/samples/nsprobe.c
+++ b/lib/export/samples/nsprobe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009-2013 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -282,8 +282,6 @@ make_querymessage(dns_message_t *message, dns_name_t *qname0,
dns_message_puttempname(message, &qname);
if (qrdataset != NULL)
dns_message_puttemprdataset(message, &qrdataset);
- if (message != NULL)
- dns_message_destroy(&message);
return (result);
}
@@ -293,7 +291,7 @@ make_querymessage(dns_message_t *message, dns_name_t *qname0,
static inline void
increment_entry(unsigned long *entryp) {
(*entryp)++;
- INSIST(*entryp != 0); /* check overflow */
+ INSIST(*entryp != 0U); /* check overflow */
}
static void
@@ -392,57 +390,57 @@ update_stat(struct probe_trans *trans) {
}
/* Update per domain statistics */
- if (local_stat.ignore > 0) {
+ if (local_stat.ignore > 0U) {
if (verbose_level > 0)
printf("%s:ignore\n", trans->domain);
increment_entry(&domain_stat.ignore);
err_count++;
}
- if (local_stat.nxdomain > 0) {
+ if (local_stat.nxdomain > 0U) {
if (verbose_level > 0)
printf("%s:nxdomain\n", trans->domain);
increment_entry(&domain_stat.nxdomain);
err_count++;
}
- if (local_stat.othererr > 0) {
+ if (local_stat.othererr > 0U) {
if (verbose_level > 0)
printf("%s:othererr\n", trans->domain);
increment_entry(&domain_stat.othererr);
err_count++;
}
- if (local_stat.multiplesoa > 0) {
+ if (local_stat.multiplesoa > 0U) {
if (verbose_level > 0)
printf("%s:multiplesoa\n", trans->domain);
increment_entry(&domain_stat.multiplesoa);
err_count++;
}
- if (local_stat.multiplecname > 0) {
+ if (local_stat.multiplecname > 0U) {
if (verbose_level > 0)
printf("%s:multiplecname\n", trans->domain);
increment_entry(&domain_stat.multiplecname);
err_count++;
}
- if (local_stat.brokenanswer > 0) {
+ if (local_stat.brokenanswer > 0U) {
if (verbose_level > 0)
printf("%s:brokenanswer\n", trans->domain);
increment_entry(&domain_stat.brokenanswer);
err_count++;
}
- if (local_stat.lame > 0) {
+ if (local_stat.lame > 0U) {
if (verbose_level > 0)
printf("%s:lame\n", trans->domain);
increment_entry(&domain_stat.lame);
err_count++;
}
- if (err_count > 1)
+ if (err_count > 1U)
increment_entry(&multiple_error_domains);
/*
* We regard the domain as valid if and only if no authoritative server
* has a problem and at least one server is known to be valid.
*/
- if (local_stat.valid > 0 && err_count == 0) {
+ if (local_stat.valid > 0U && err_count == 0U) {
if (verbose_level > 1)
printf("%s:valid\n", trans->domain);
increment_entry(&domain_stat.valid);
@@ -452,7 +450,7 @@ update_stat(struct probe_trans *trans) {
* If the domain has no available server or all servers have the
* 'unknown' result, the domain's result is also regarded as unknown.
*/
- if (local_stat.valid == 0 && err_count == 0) {
+ if (local_stat.valid == 0U && err_count == 0U) {
if (verbose_level > 1)
printf("%s:unknown\n", trans->domain);
increment_entry(&domain_stat.unknown);
@@ -1218,5 +1216,5 @@ main(int argc, char *argv[]) {
isc_app_ctxfinish(actx);
ctxs_destroy(&mctx, &actx, &taskmgr, &socketmgr, &timermgr);
- exit(0);
+ return (0);
}
diff --git a/lib/export/samples/sample-async.c b/lib/export/samples/sample-async.c
index e646e79..a70dd47 100644
--- a/lib/export/samples/sample-async.c
+++ b/lib/export/samples/sample-async.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2013 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -398,5 +398,5 @@ main(int argc, char *argv[]) {
isc_app_ctxfinish(query_actx);
ctxs_destroy(&mctx, &query_actx, &taskmgr, &socketmgr, &timermgr);
- exit(0);
+ return (0);
}
diff --git a/lib/export/samples/sample-gai.c b/lib/export/samples/sample-gai.c
index 6dc4014..243d07a 100644
--- a/lib/export/samples/sample-gai.c
+++ b/lib/export/samples/sample-gai.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -61,7 +61,7 @@ do_gai(int family, char *hostname) {
}
}
- freeaddrinfo(res);
+ freeaddrinfo(res0);
}
int
@@ -73,5 +73,5 @@ main(int argc, char *argv[]) {
do_gai(AF_INET6, argv[1]);
do_gai(AF_UNSPEC, argv[1]);
- exit(0);
+ return (0);
}
diff --git a/lib/export/samples/sample-request.c b/lib/export/samples/sample-request.c
index d5d2312..07baf39 100644
--- a/lib/export/samples/sample-request.c
+++ b/lib/export/samples/sample-request.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -77,9 +77,12 @@ make_querymessage(dns_message_t *message, const char *namestr,
isc_buffer_t b;
size_t namelen;
+ REQUIRE(message != NULL);
+ REQUIRE(namestr != NULL);
+
/* Construct qname */
namelen = strlen(namestr);
- isc_buffer_init(&b, namestr, namelen);
+ isc_buffer_constinit(&b, namestr, namelen);
isc_buffer_add(&b, namelen);
dns_fixedname_init(&fixedqname);
qname0 = dns_fixedname_name(&fixedqname);
@@ -115,8 +118,7 @@ make_querymessage(dns_message_t *message, const char *namestr,
dns_message_puttempname(message, &qname);
if (qrdataset != NULL)
dns_message_puttemprdataset(message, &qrdataset);
- if (message != NULL)
- dns_message_destroy(&message);
+ dns_message_destroy(&message);
return (result);
}
@@ -259,5 +261,5 @@ main(int argc, char *argv[]) {
dns_client_destroy(&client);
dns_lib_shutdown();
- exit(0);
+ return (0);
}
diff --git a/lib/export/samples/sample-update.c b/lib/export/samples/sample-update.c
index e54d154..2c35baa 100644
--- a/lib/export/samples/sample-update.c
+++ b/lib/export/samples/sample-update.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2010, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -305,7 +305,7 @@ main(int argc, char *argv[]) {
dns_client_destroy(&client);
dns_lib_shutdown();
- exit(0);
+ return (0);
}
/*
@@ -372,7 +372,7 @@ parse_name(char **cmdlinep, dns_name_t *name) {
isc_buffer_t source;
word = nsu_strsep(cmdlinep, " \t\r\n");
- if (*word == 0) {
+ if (word == NULL || *word == 0) {
fprintf(stderr, "could not read owner name\n");
exit(1);
}
diff --git a/lib/export/samples/sample.c b/lib/export/samples/sample.c
index 7fc6a30..b121a0d 100644
--- a/lib/export/samples/sample.c
+++ b/lib/export/samples/sample.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -172,7 +172,9 @@ set_key(dns_client_t *client, char *keynamestr, char *keystr,
}
static void
-addserver(dns_client_t *client, const char *addrstr, const char *namespace) {
+addserver(dns_client_t *client, const char *addrstr, const char *port,
+ const char *namespace)
+{
struct addrinfo hints, *res;
int gai_error;
isc_sockaddr_t sa;
@@ -188,7 +190,7 @@ addserver(dns_client_t *client, const char *addrstr, const char *namespace) {
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
hints.ai_flags = AI_NUMERICHOST;
- gai_error = getaddrinfo(addrstr, "53", &hints, &res);
+ gai_error = getaddrinfo(addrstr, port, &hints, &res);
if (gai_error != 0) {
fprintf(stderr, "getaddrinfo failed: %s\n",
gai_strerror(gai_error));
@@ -196,15 +198,15 @@ addserver(dns_client_t *client, const char *addrstr, const char *namespace) {
}
INSIST(res->ai_addrlen <= sizeof(sa.type));
memcpy(&sa.type, res->ai_addr, res->ai_addrlen);
- freeaddrinfo(res);
sa.length = res->ai_addrlen;
+ freeaddrinfo(res);
ISC_LINK_INIT(&sa, link);
ISC_LIST_INIT(servers);
ISC_LIST_APPEND(servers, &sa, link);
if (namespace != NULL) {
namelen = strlen(namespace);
- isc_buffer_init(&b, namespace, namelen);
+ isc_buffer_constinit(&b, namespace, namelen);
isc_buffer_add(&b, namelen);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
@@ -245,8 +247,9 @@ main(int argc, char *argv[]) {
isc_mem_t *keymctx = NULL;
unsigned int clientopt, resopt;
isc_boolean_t is_sep = ISC_FALSE;
+ const char *port = "53";
- while ((ch = getopt(argc, argv, "a:es:t:k:K:")) != -1) {
+ while ((ch = getopt(argc, argv, "a:es:t:k:K:p:")) != -1) {
switch (ch) {
case 't':
tr.base = optarg;
@@ -279,6 +282,9 @@ main(int argc, char *argv[]) {
case 'K':
keystr = optarg;
break;
+ case 'p':
+ port = optarg;
+ break;
default:
usage();
}
@@ -318,11 +324,11 @@ main(int argc, char *argv[]) {
}
/* Set the nameserver */
- addserver(client, argv[0], NULL);
+ addserver(client, argv[0], port, NULL);
/* Set the alternate nameserver (when specified) */
if (altserver != NULL)
- addserver(client, altserveraddr, altservername);
+ addserver(client, altserveraddr, port, altservername);
/* Install DNSSEC key (if given) */
if (keynamestr != NULL) {
@@ -374,5 +380,5 @@ main(int argc, char *argv[]) {
isc_mem_destroy(&keymctx);
dns_lib_shutdown();
- exit(0);
+ return (0);
}
OpenPOWER on IntegriCloud