package/libldns: new package

Needed by freeswitch.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Bernd Kuhls 2015-08-29 12:53:38 +02:00 committed by Thomas Petazzoni
parent 5dc0167525
commit 721c78c9e0
6 changed files with 120 additions and 0 deletions

View File

@ -990,6 +990,7 @@ menu "Networking"
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"

View File

@ -0,0 +1,25 @@
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

View File

@ -0,0 +1,45 @@
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);

View File

@ -0,0 +1,9 @@
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

View File

@ -0,0 +1,4 @@
# 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

View File

@ -0,0 +1,36 @@
################################################################################
#
# 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))