diff options
author | erwin <erwin@FreeBSD.org> | 2013-08-06 06:22:54 +0000 |
---|---|---|
committer | erwin <erwin@FreeBSD.org> | 2013-08-06 06:22:54 +0000 |
commit | ef27886236495d424b7f096da332d093109780a6 (patch) | |
tree | b4ab3fc36f81b1377b903cb2fe0ca445c0304cbd /contrib/bind9/lib/export/samples | |
parent | c116c25dd59e2f090a93b32234e356ae28d96a02 (diff) | |
parent | 414d5ed7dd8cad7ef2738c53f9b9ecfe246ed91c (diff) | |
download | FreeBSD-src-ef27886236495d424b7f096da332d093109780a6.zip FreeBSD-src-ef27886236495d424b7f096da332d093109780a6.tar.gz |
Update Bind to 9.8.5-P2
New Features
Adds a new configuration option, "check-spf"; valid values are
"warn" (default) and "ignore". When set to "warn", checks SPF
and TXT records in spf format, warning if either resource record
type occurs without a corresponding record of the other resource
record type. [RT #33355]
Adds support for Uniform Resource Identifier (URI) resource
records. [RT #23386]
Adds support for the EUI48 and EUI64 RR types. [RT #33082]
Adds support for the RFC 6742 ILNP record types (NID, LP, L32,
and L64). [RT #31836]
Feature Changes
Changes timing of when slave zones send NOTIFY messages after
loading a new copy of the zone. They now send the NOTIFY before
writing the zone data to disk. This will result in quicker
propagation of updates in multi-level server structures. [RT #27242]
"named -V" can now report a source ID string. (This is will be
of most interest to developers and troubleshooters). The source
ID for ISC's production versions of BIND is defined in the "srcid"
file in the build tree and is normally set to the most recent
git hash. [RT #31494]
Response Policy Zone performance enhancements. New "response-policy"
option "min-ns-dots". "nsip" and "nsdname" now enabled by default
with RPZ. [RT #32251]
Approved by: delphij (mentor)
Sponsored by: DK Hostmaster A/S
Diffstat (limited to 'contrib/bind9/lib/export/samples')
-rw-r--r-- | contrib/bind9/lib/export/samples/Makefile.in | 5 | ||||
-rw-r--r-- | contrib/bind9/lib/export/samples/nsprobe.c | 28 | ||||
-rw-r--r-- | contrib/bind9/lib/export/samples/sample-async.c | 4 | ||||
-rw-r--r-- | contrib/bind9/lib/export/samples/sample-gai.c | 6 | ||||
-rw-r--r-- | contrib/bind9/lib/export/samples/sample-request.c | 12 | ||||
-rw-r--r-- | contrib/bind9/lib/export/samples/sample-update.c | 6 | ||||
-rw-r--r-- | contrib/bind9/lib/export/samples/sample.c | 24 |
7 files changed, 46 insertions, 39 deletions
diff --git a/contrib/bind9/lib/export/samples/Makefile.in b/contrib/bind9/lib/export/samples/Makefile.in index cdc66b1..194aaeb 100644 --- a/contrib/bind9/lib/export/samples/Makefile.in +++ b/contrib/bind9/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/contrib/bind9/lib/export/samples/nsprobe.c b/contrib/bind9/lib/export/samples/nsprobe.c index 869b194..1d7ed3b 100644 --- a/contrib/bind9/lib/export/samples/nsprobe.c +++ b/contrib/bind9/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/contrib/bind9/lib/export/samples/sample-async.c b/contrib/bind9/lib/export/samples/sample-async.c index e646e79..a70dd47 100644 --- a/contrib/bind9/lib/export/samples/sample-async.c +++ b/contrib/bind9/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/contrib/bind9/lib/export/samples/sample-gai.c b/contrib/bind9/lib/export/samples/sample-gai.c index 6dc4014..243d07a 100644 --- a/contrib/bind9/lib/export/samples/sample-gai.c +++ b/contrib/bind9/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/contrib/bind9/lib/export/samples/sample-request.c b/contrib/bind9/lib/export/samples/sample-request.c index d5d2312..07baf39 100644 --- a/contrib/bind9/lib/export/samples/sample-request.c +++ b/contrib/bind9/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/contrib/bind9/lib/export/samples/sample-update.c b/contrib/bind9/lib/export/samples/sample-update.c index e54d154..2c35baa 100644 --- a/contrib/bind9/lib/export/samples/sample-update.c +++ b/contrib/bind9/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/contrib/bind9/lib/export/samples/sample.c b/contrib/bind9/lib/export/samples/sample.c index 7fc6a30..b121a0d 100644 --- a/contrib/bind9/lib/export/samples/sample.c +++ b/contrib/bind9/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); } |