Needed by freeswitch.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
source "package/libhttpparser/Config.in"
source "package/libidn/Config.in"
source "package/libiscsi/Config.in"
+ source "package/libldns/Config.in"
source "package/libmbus/Config.in"
source "package/libmemcached/Config.in"
source "package/libmicrohttpd/Config.in"
--- /dev/null
+Downloaded from
+http://anonscm.debian.org/cgit/pkg-nlnetlabs/ldns.git/plain/debian/patches/fix-double-free-for-answers-bigger-than-4096.patch
+
+which is a backport from upstream
+http://git.nlnetlabs.nl/ldns/commit/?h=develop&id=2853eb352b4461e98f2926ace4ea3810cedf4167
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+From 2853eb352b4461e98f2926ace4ea3810cedf4167 Mon Sep 17 00:00:00 2001
+From: Willem Toorop <willem@nlnetlabs.nl>
+Date: Tue, 28 Jan 2014 11:06:38 +0100
+Subject: bugfix #548: Double free for answers > 4096
+
+in ldns_resolver_send_pkt. Thank you sunthought@gmail.com
+---
+--- ldns.orig/resolver.c
++++ ldns/resolver.c
+@@ -1117,6 +1117,7 @@ ldns_resolver_send_pkt(ldns_pkt **answer
+ ldns_pkt_set_edns_udp_size(query_pkt
+ , 4096);
+ ldns_pkt_free(answer_pkt);
++ answer_pkt = NULL;
+ /* Nameservers should not become
+ * unreachable because fragments are
+ * dropped (network error). We might
--- /dev/null
+Dwonloaded from
+http://anonscm.debian.org/cgit/pkg-nlnetlabs/ldns.git/tree/debian/patches/fix-whitespace-bug-in-ldns-read-zone.patch
+
+which is a backport from
+http://git.nlnetlabs.nl/ldns/commit/?h=develop&id=d6037a22fbedb8ef3a22de4107e4eaa36840865b
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+From d6037a22fbedb8ef3a22de4107e4eaa36840865b Mon Sep 17 00:00:00 2001
+From: Matthijs Mekking <matthijs@nlnetlabs.nl>
+Date: Wed, 18 Jun 2014 09:55:17 +0200
+Subject: whitespace bug in ldns-read-zone
+
+---
+--- ldns.orig/rr.c
++++ ldns/rr.c
+@@ -670,6 +670,18 @@ ldns_rr_new_question_frm_str(ldns_rr **n
+ true);
+ }
+
++static int
++ldns_rr_is_whitespace_line(char* line, int line_len)
++{
++ int i;
++ for (i = 0; i < line_len; i++) {
++ if (!isspace((int)line[i])) {
++ return 0;
++ }
++ }
++ return 1;
++}
++
+ ldns_status
+ ldns_rr_new_frm_fp(ldns_rr **newrr, FILE *fp, uint32_t *ttl, ldns_rdf **origin, ldns_rdf **prev)
+ {
+@@ -745,6 +757,9 @@ ldns_rr_new_frm_fp_l(ldns_rr **newrr, FI
+ s = LDNS_STATUS_SYNTAX_TTL;
+ } else if (strncmp(line, "$INCLUDE", 8) == 0) {
+ s = LDNS_STATUS_SYNTAX_INCLUDE;
++ } else if (ldns_rr_is_whitespace_line(line, size)) {
++ LDNS_FREE(line);
++ return LDNS_STATUS_SYNTAX_EMPTY;
+ } else {
+ if (origin && *origin) {
+ s = ldns_rr_new_frm_str(&rr, (const char*) line, ttl, *origin, prev);
--- /dev/null
+config BR2_PACKAGE_LIBLDNS
+ bool "libldns"
+ help
+ The goal of ldns is to simplify DNS programming, it supports
+ recent RFCs like the DNSSEC documents, and allows developers
+ to easily create software conforming to current RFCs, and
+ experimental software for current Internet Drafts.
+
+ http://www.nlnetlabs.nl/projects/ldns
--- /dev/null
+# From http://www.nlnetlabs.nl/downloads/ldns/ldns-1.6.17.tar.gz.sha1
+sha1 4218897b3c002aadfc7280b3f40cda829e05c9a4 ldns-1.6.17.tar.gz
+# Locally calculated
+sha256 8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd ldns-1.6.17.tar.gz
--- /dev/null
+################################################################################
+#
+# libldns
+#
+################################################################################
+
+LIBLDNS_VERSION = 1.6.17
+LIBLDNS_SOURCE = ldns-$(LIBLDNS_VERSION).tar.gz
+LIBLDNS_SITE = http://www.nlnetlabs.nl/downloads/ldns
+LIBLDNS_LICENSE = BSD-3c
+LIBLDNS_LICENSE_FILES = LICENSE
+LIBLDNS_INSTALL_STAGING = YES
+LIBLDNS_CONF_OPTS = \
+ --without-examples \
+ --without-p5-dns-ldns \
+ --without-pyldns \
+ --without-pyldnsx
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+LIBLDNS_DEPENDENCIES += host-pkgconf openssl
+LIBLDNS_CONF_OPTS += \
+ --with-ssl=$(STAGING_DIR)/usr \
+ --enable-dane \
+ --enable-ecdsa \
+ --enable-gost \
+ --enable-sha2
+else
+LIBLDNS_CONF_OPTS += \
+ --without-ssl \
+ --disable-dane \
+ --disable-ecdsa \
+ --disable-gost \
+ --disable-sha2
+endif
+
+$(eval $(autotools-package))