Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Apr 2013 13:14:39 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r249307 - head/contrib/ldns
Message-ID:  <201304091314.r39DEdPK008637@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Tue Apr  9 13:14:39 2013
New Revision: 249307
URL: http://svnweb.freebsd.org/changeset/base/249307

Log:
  Revert local changes and pull in r3828 from upstream.

Modified:
  head/contrib/ldns/README
  head/contrib/ldns/README.svn
  head/contrib/ldns/dnssec_verify.c
  head/contrib/ldns/dnssec_zone.c
  head/contrib/ldns/parse.c
  head/contrib/ldns/rr.c
  head/contrib/ldns/util.c
  head/contrib/ldns/zone.c
Directory Properties:
  head/contrib/ldns/   (props changed)

Modified: head/contrib/ldns/README
==============================================================================
--- head/contrib/ldns/README	Tue Apr  9 13:08:33 2013	(r249306)
+++ head/contrib/ldns/README	Tue Apr  9 13:14:39 2013	(r249307)
@@ -22,6 +22,8 @@ compile on other systems like Solaris an
 
 REQUIREMENTS
 - OpenSSL (Optional, but needed for features like DNSSEC)
+  - OpenSSL >= 0.9.7f for DANE support
+  - OpenSSL >= 1.0.0  for ECDSA and GOST support
 - libpcap (Optional, but needed for examples/ldns-dpa)
 - (GNU) libtool (in OSX, that's glibtool, not libtool)
 - GNU make
@@ -29,32 +31,10 @@ REQUIREMENTS
 INSTALLATION
 1. Unpack the tarball
 2. cd ldns-<VERSION>
-3. ./configure
-4. gmake (it needs gnu make to compile, on systems where GNU make is the
-   default you can just use 'make')
-5. sudo gmake install
-6. Optional. (cd examples; ./configure; gmake), make example programs included.
-7. Optional. (cd drill; ./configure; gmake; gmake install), to build drill.
-
-You can configure and compile it in a separate build directory.
-
-* Examples
-There are some examples and dns related tools in the examples/ directory.
-These can be built with:
-1. cd examples/
-2. ./configure [--with-ldns=<path to ldns installation or build>]
-3. gmake
-
-* Drill
-Drill can be built with:
-1. cd drill/
-2. ./configure [--with-ldns=<path to ldns installation or build>]
-3. gmake
-
-Note that you need to set LD_LIBRARY_PATH if you want to run the binaries
-and you have not installed the library to a system directory. You can use
-the make target all-static for the examples to run them if you don't want to
-install the library.
+3. ./configure --with-examples --with-drill
+   (optionally compile python bindings too with: --with-pyldns)
+4. make
+5. make install
 
 
 * Building from subversion repository
@@ -84,6 +64,10 @@ We have received patches from the follow
   o Paul Wouters
   o Simon Vallet
   o Ondřej Surý
+  o Karel Slany
+  o Havard Eidnes
+  o Leo Baltus
+  o Dag-Erling Smørgrav
 
 
 INFORMATION FOR SPECIFIC OPERATING SYSTEMS

Modified: head/contrib/ldns/README.svn
==============================================================================
--- head/contrib/ldns/README.svn	Tue Apr  9 13:08:33 2013	(r249306)
+++ head/contrib/ldns/README.svn	Tue Apr  9 13:14:39 2013	(r249307)
@@ -10,17 +10,14 @@
 # the correct versions may need to be set. On those
 # systems, the 'autoreconf' line should be changed to:
 # AUTOMAKE=automake-1.10 ACLOCAL=aclocal-1.10 autoreconf
-# (and these systems probably need gmake instead of make)
 
 # older versions of libtoolize do not support --install
 # so you might need to remove that (with newer versions
 # it is needed)
 libtoolize -c --install
 autoreconf --install
-./configure
+./configure --with-examples --with-drill # --with-pyldns
 make
 make doc  # needs doxygen for the html pages
-(cd examples && autoreconf && ./configure && make)
-(cd drill && autoreconf && ./configure && make)
 (cd pcat && autoreconf && ./configure && make)
 (cd examples/nsd-test && autoreconf && ./configure && make)

Modified: head/contrib/ldns/dnssec_verify.c
==============================================================================
--- head/contrib/ldns/dnssec_verify.c	Tue Apr  9 13:08:33 2013	(r249306)
+++ head/contrib/ldns/dnssec_verify.c	Tue Apr  9 13:14:39 2013	(r249307)
@@ -628,20 +628,6 @@ ldns_dnssec_trust_tree_print_sm_fmt(FILE
 	}
 }
 
-#if 0
-static void
-ldns_dnssec_trust_tree_print_sm(FILE *out, 
-		ldns_dnssec_trust_tree *tree,
-		size_t tabs,
-		bool extended,
-		uint8_t *sibmap,
-		size_t treedepth)
-{
-	ldns_dnssec_trust_tree_print_sm_fmt(out, ldns_output_format_default, 
-			tree, tabs, extended, sibmap, treedepth);
-}
-#endif
-
 void
 ldns_dnssec_trust_tree_print_fmt(FILE *out, const ldns_output_format *fmt,
 		ldns_dnssec_trust_tree *tree,

Modified: head/contrib/ldns/dnssec_zone.c
==============================================================================
--- head/contrib/ldns/dnssec_zone.c	Tue Apr  9 13:08:33 2013	(r249306)
+++ head/contrib/ldns/dnssec_zone.c	Tue Apr  9 13:14:39 2013	(r249307)
@@ -298,17 +298,6 @@ ldns_dnssec_rrsets_print_soa_fmt(FILE *o
 	}
 }
 
-#if 0
-static void
-ldns_dnssec_rrsets_print_soa(FILE *out,
-		ldns_dnssec_rrsets *rrsets,
-		bool follow,
-		bool show_soa)
-{
-	ldns_dnssec_rrsets_print_soa_fmt(out, ldns_output_format_default,
-		       	rrsets, follow, show_soa);
-}
-#endif
 
 void
 ldns_dnssec_rrsets_print_fmt(FILE *out, const ldns_output_format *fmt,
@@ -429,16 +418,6 @@ ldns_dnssec_name_set_name(ldns_dnssec_na
 	}
 }
 
-#if 0
-static ldns_rr *
-ldns_dnssec_name_nsec(ldns_dnssec_name *rrset)
-{
-	if (rrset) {
-		return rrset->nsec;
-	}
-	return NULL;
-}
-#endif
 
 void
 ldns_dnssec_name_set_nsec(ldns_dnssec_name *rrset, ldns_rr *nsec)
@@ -592,14 +571,6 @@ ldns_dnssec_name_print_soa_fmt(FILE *out
 	}
 }
 
-#if 0
-static void
-ldns_dnssec_name_print_soa(FILE *out, ldns_dnssec_name *name, bool show_soa)
-{
-	ldns_dnssec_name_print_soa_fmt(out, ldns_output_format_default,
-		       name, show_soa);
-}
-#endif
 
 void
 ldns_dnssec_name_print_fmt(FILE *out, const ldns_output_format *fmt,
@@ -827,7 +798,7 @@ ldns_dnssec_zone_deep_free(ldns_dnssec_z
 }
 
 /* use for dname comparison in tree */
-static int
+int
 ldns_dname_compare_v(const void *a, const void *b) {
 	return ldns_dname_compare((ldns_rdf *)a, (ldns_rdf *)b);
 }

Modified: head/contrib/ldns/parse.c
==============================================================================
--- head/contrib/ldns/parse.c	Tue Apr  9 13:08:33 2013	(r249306)
+++ head/contrib/ldns/parse.c	Tue Apr  9 13:14:39 2013	(r249307)
@@ -340,20 +340,6 @@ tokenread:
 	return (ssize_t)i;
 }
 
-#if 0
-static void
-ldns_bskipc(ldns_buffer *buffer, char c)
-{
-        while (c == (char) ldns_buffer_read_u8_at(buffer, ldns_buffer_position(buffer))) {
-                if (ldns_buffer_available_at(buffer,
-					buffer->_position + sizeof(char), sizeof(char))) {
-                        buffer->_position += sizeof(char);
-                } else {
-                        return;
-                }
-        }
-}
-#endif
 
 void
 ldns_bskipcs(ldns_buffer *buffer, const char *s)
@@ -378,13 +364,6 @@ ldns_bskipcs(ldns_buffer *buffer, const 
         }
 }
 
-#if 0
-static void
-ldns_fskipc(ATTR_UNUSED(FILE *fp), ATTR_UNUSED(char c))
-{
-}
-#endif
-
 void
 ldns_fskipcs(FILE *fp, const char *s)
 {

Modified: head/contrib/ldns/rr.c
==============================================================================
--- head/contrib/ldns/rr.c	Tue Apr  9 13:08:33 2013	(r249306)
+++ head/contrib/ldns/rr.c	Tue Apr  9 13:14:39 2013	(r249307)
@@ -1394,25 +1394,6 @@ ldns_rr_list_clone(const ldns_rr_list *r
 	return new_list;
 }
 
-#if 0
-static int
-qsort_rr_compare(const void *a, const void *b)
-{
-	const ldns_rr *rr1 = * (const ldns_rr **) a;
-	const ldns_rr *rr2 = * (const ldns_rr **) b;
-
-	if (rr1 == NULL && rr2 == NULL) {
-		return 0;
-	}
-	if (rr1 == NULL) {
-		return -1;
-	}
-	if (rr2 == NULL) {
-		return 1;
-	}
-	return ldns_rr_compare(rr1, rr2);
-}
-#endif
 
 static int
 qsort_schwartz_rr_compare(const void *a, const void *b)

Modified: head/contrib/ldns/util.c
==============================================================================
--- head/contrib/ldns/util.c	Tue Apr  9 13:08:33 2013	(r249306)
+++ head/contrib/ldns/util.c	Tue Apr  9 13:14:39 2013	(r249307)
@@ -25,46 +25,6 @@
 #include <openssl/rand.h>
 #endif
 
-#if 0
-/* put this here tmp. for debugging */
-static void
-xprintf_rdf(ldns_rdf *rd)
-{
-	/* assume printable string */
-	fprintf(stderr, "size\t:%u\n", (unsigned int)ldns_rdf_size(rd));
-	fprintf(stderr, "type\t:%u\n", (unsigned int)ldns_rdf_get_type(rd));
-	fprintf(stderr, "data\t:[%.*s]\n", (int)ldns_rdf_size(rd),
-			(char*)ldns_rdf_data(rd));
-}
-
-static void
-xprintf_rr(ldns_rr *rr)
-{
-	/* assume printable string */
-	uint16_t count, i;
-
-	count = ldns_rr_rd_count(rr);
-
-	for(i = 0; i < count; i++) {
-		fprintf(stderr, "print rd %u\n", (unsigned int) i);
-		xprintf_rdf(rr->_rdata_fields[i]);
-	}
-}
-
-static void
-xprintf_hex(uint8_t *data, size_t len)
-{
-	size_t i;
-	for (i = 0; i < len; i++) {
-		if (i > 0 && i % 20 == 0) {
-			printf("\t; %u - %u\n", (unsigned int) i - 19, (unsigned int) i);
-		}
-		printf("%02x ", (unsigned int) data[i]);
-	}
-	printf("\n");
-}
-#endif
-
 ldns_lookup_table *
 ldns_lookup_by_name(ldns_lookup_table *table, const char *name)
 {

Modified: head/contrib/ldns/zone.c
==============================================================================
--- head/contrib/ldns/zone.c	Tue Apr  9 13:08:33 2013	(r249306)
+++ head/contrib/ldns/zone.c	Tue Apr  9 13:14:39 2013	(r249307)
@@ -56,105 +56,6 @@ ldns_zone_push_rr(ldns_zone *z, ldns_rr 
 	return ldns_rr_list_push_rr( ldns_zone_rrs(z), rr);
 }
 
-#if 0
-/* return a clone of the given rr list, without the glue records
- * rr list should be the complete zone
- * if present, stripped records are added to the list *glue_records
- */
-static ldns_rr_list *
-ldns_zone_strip_glue_rrs(const ldns_rdf *zone_name, const ldns_rr_list *rrs, ldns_rr_list *glue_rrs)
-{
-	ldns_rr_list *new_list;
-
-	/* when do we find glue? It means we find an IP address
-	 * (AAAA/A) for a nameserver listed in the zone
-	 *
-	 * Alg used here:
-	 * first find all the zonecuts (NS records)
-	 * find all the AAAA or A records (can be done it the 
-	 * above loop).
-	 *
-	 * Check if the aaaa/a list are subdomains under the
-	 * NS domains.
-	 * If yes -> glue, if no -> not glue
-	 */
-
-	ldns_rr_list *zone_cuts;
-	ldns_rr_list *addr;
-	ldns_rr *r, *ns, *a;
-	ldns_rdf *dname_a, *ns_owner;
-	uint16_t i,j;
-
-	new_list = NULL;
-	zone_cuts = NULL;
-	addr = NULL;
-
-	new_list = ldns_rr_list_new();
-	if (!new_list) goto memory_error;
-	zone_cuts = ldns_rr_list_new();
-	if (!zone_cuts) goto memory_error;
-	addr = ldns_rr_list_new();
-	if (!addr) goto memory_error;
-
-	for(i = 0; i < ldns_rr_list_rr_count(rrs); i++) {
-		r = ldns_rr_list_rr(rrs, i);
-		if (ldns_rr_get_type(r) == LDNS_RR_TYPE_A ||
-				ldns_rr_get_type(r) == LDNS_RR_TYPE_AAAA) {
-			/* possibly glue */
-			if (!ldns_rr_list_push_rr(addr, r)) goto memory_error;
-			continue;
-		}
-		if (ldns_rr_get_type(r) == LDNS_RR_TYPE_NS) {
-			/* multiple zones will end up here -
-			 * for now; not a problem
-			 */
-			/* don't add NS records for the current zone itself */
-			if (ldns_rdf_compare(ldns_rr_owner(r), 
-						zone_name) != 0) {
-				if (!ldns_rr_list_push_rr(zone_cuts, r)) goto memory_error;
-			}
-			continue;
-		}
-	}
-
-	/* will sorting make it quicker ?? */
-	for(i = 0; i < ldns_rr_list_rr_count(zone_cuts); i++) {
-		ns = ldns_rr_list_rr(zone_cuts, i);
-		ns_owner = ldns_rr_owner(ns);
-		for(j = 0; j < ldns_rr_list_rr_count(addr); j++) {
-			a = ldns_rr_list_rr(addr, j);
-			dname_a = ldns_rr_owner(a);
-			
-			if (ldns_dname_is_subdomain(dname_a, ns_owner)) {
-				/* GLUE! */
-				if (glue_rrs) {
-					if (!ldns_rr_list_push_rr(glue_rrs, a)) goto memory_error;
-				}
-				break;
-			} else {
-				if (!ldns_rr_list_push_rr(new_list, a)) goto memory_error;
-			}
-		}
-	}
-	
-	ldns_rr_list_free(addr);
-	ldns_rr_list_free(zone_cuts);
-
-	return new_list;
-
-memory_error:
-	if (new_list) {
-		ldns_rr_list_free(new_list);
-	}
-	if (zone_cuts) {
-		ldns_rr_list_free(zone_cuts);
-	}
-	if (addr) {
-		ldns_rr_list_free(addr);
-	}
-	return NULL;
-}
-#endif
 
 /*
  * Get the list of glue records in a zone
@@ -401,22 +302,6 @@ ldns_zone_sort(ldns_zone *zone)
 	ldns_rr_list_sort(zrr);
 }
 
-#if 0
-/**
- * ixfr function. Work on a ldns_zone and remove and add
- * the rrs from the rrlist
- * \param[in] z the zone to work on
- * \param[in] del rr_list to remove from the zone
- * \param[in] add rr_list to add to the zone
- * \return Tja, wat zouden we eens returnen TODO
- */
-void
-ldns_zone_ixfr_del_add(ldns_zone *z, ldns_rr_list *del, ldns_rr_list *add)
-{
-	
-}
-#endif
-
 void
 ldns_zone_free(ldns_zone *zone) 
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304091314.r39DEdPK008637>