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/sample.c | |
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/sample.c')
-rw-r--r-- | contrib/bind9/lib/export/samples/sample.c | 24 |
1 files changed, 15 insertions, 9 deletions
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); } |