aboutsummaryrefslogtreecommitdiff
path: root/contrib/bind9/lib/lwres/lwconfig.c
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2009-05-31 05:42:58 +0000
committerDoug Barton <dougb@FreeBSD.org>2009-05-31 05:42:58 +0000
commit6318052d9e161cbc69e4085125ef824d94de16ef (patch)
tree21a5399cf53ce4f1ffedece1c1700a317f190f2e /contrib/bind9/lib/lwres/lwconfig.c
parentb6d434fc28de9fa7b453178184bdcc767035f5af (diff)
parentb0e69f719c1db2c19fcfba96f0dac9a5a2277350 (diff)
Update BIND to version 9.6.1rc1. This version has better performance and
lots of new features compared to 9.4.x, including: Full NSEC3 support Automatic zone re-signing New update-policy methods tcp-self and 6to4-self DHCID support. More detailed statistics counters including those supported in BIND 8. Faster ACL processing. Efficient LRU cache-cleaning mechanism. NSID support.
Notes
Notes: svn path=/head/; revision=193149
Diffstat (limited to 'contrib/bind9/lib/lwres/lwconfig.c')
-rw-r--r--contrib/bind9/lib/lwres/lwconfig.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/contrib/bind9/lib/lwres/lwconfig.c b/contrib/bind9/lib/lwres/lwconfig.c
index cf4f6a7f0549..7ededdfa488a 100644
--- a/contrib/bind9/lib/lwres/lwconfig.c
+++ b/contrib/bind9/lib/lwres/lwconfig.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
- * Permission to use, copy, modify, and distribute this software for any
+ * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lwconfig.c,v 1.38.18.5 2006/10/03 23:50:51 marka Exp $ */
+/* $Id: lwconfig.c,v 1.46.332.2 2008/12/30 23:46:49 tbox Exp $ */
/*! \file */
@@ -24,32 +24,32 @@
*
* lwres_conf_init() creates an empty lwres_conf_t structure for
* lightweight resolver context ctx.
- *
+ *
* lwres_conf_clear() frees up all the internal memory used by that
* lwres_conf_t structure in resolver context ctx.
- *
+ *
* lwres_conf_parse() opens the file filename and parses it to initialise
* the resolver context ctx's lwres_conf_t structure.
- *
+ *
* lwres_conf_print() prints the lwres_conf_t structure for resolver
* context ctx to the FILE fp.
- *
+ *
* \section lwconfig_return Return Values
- *
+ *
* lwres_conf_parse() returns #LWRES_R_SUCCESS if it successfully read and
* parsed filename. It returns #LWRES_R_FAILURE if filename could not be
* opened or contained incorrect resolver statements.
- *
+ *
* lwres_conf_print() returns #LWRES_R_SUCCESS unless an error occurred
* when converting the network addresses to a numeric host address
* string. If this happens, the function returns #LWRES_R_FAILURE.
- *
+ *
* \section lwconfig_see See Also
- *
+ *
* stdio(3), \link resolver resolver \endlink
- *
+ *
* \section files Files
- *
+ *
* /etc/resolv.conf
*/
@@ -313,8 +313,11 @@ lwres_conf_parsenameserver(lwres_context_t *ctx, FILE *fp) {
return (LWRES_R_FAILURE); /* Extra junk on line. */
res = lwres_create_addr(word, &address, 1);
- if (res == LWRES_R_SUCCESS)
+ if (res == LWRES_R_SUCCESS &&
+ ((address.family == LWRES_ADDRTYPE_V4 && ctx->use_ipv4 == 1) ||
+ (address.family == LWRES_ADDRTYPE_V6 && ctx->use_ipv6 == 1))) {
confdata->nameservers[confdata->nsnext++] = address;
+ }
return (LWRES_R_SUCCESS);
}