Update to 4.0.4
This commit is contained in:
parent
394858c938
commit
4d06cce0b8
1
.gitignore
vendored
1
.gitignore
vendored
@ -29,3 +29,4 @@ pdns-2.9.22.tar.gz
|
|||||||
/pdns-4.0.1.tar.bz2
|
/pdns-4.0.1.tar.bz2
|
||||||
/pdns-4.0.2.tar.bz2
|
/pdns-4.0.2.tar.bz2
|
||||||
/pdns-4.0.3.tar.bz2
|
/pdns-4.0.3.tar.bz2
|
||||||
|
/pdns-4.0.4.tar.bz2
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
From 6cbfa73b35a5cc7325b58625c0698576fb99601f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Remi Gacogne <remi.gacogne@powerdns.com>
|
|
||||||
Date: Sun, 15 Jan 2017 21:45:27 +0100
|
|
||||||
Subject: [PATCH] Fix negative port detection for IPv6 addresses on 32-bit
|
|
||||||
|
|
||||||
On a 32-bit Arch, our `test_ComboAddress` unit test fails because
|
|
||||||
`ComboAddress("[::1]:-6")` is considered valid. This is caused by
|
|
||||||
`stoul()` not throwing for a negative value and returning an `unsigned
|
|
||||||
long` value using unsigned integer wraparound rules. Since we used to
|
|
||||||
store the result value in a `signed int` and treat negative values
|
|
||||||
as if the port was not set, the test failed.
|
|
||||||
---
|
|
||||||
pdns/misc.cc | 12 +++++++-----
|
|
||||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pdns/misc.cc b/pdns/misc.cc
|
|
||||||
index 10912ff..c80b4d5 100644
|
|
||||||
--- a/pdns/misc.cc
|
|
||||||
+++ b/pdns/misc.cc
|
|
||||||
@@ -710,7 +710,8 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
|
|
||||||
if(addr.empty())
|
|
||||||
return -1;
|
|
||||||
string ourAddr(addr);
|
|
||||||
- int port = -1;
|
|
||||||
+ bool portSet = false;
|
|
||||||
+ unsigned int port;
|
|
||||||
if(addr[0]=='[') { // [::]:53 style address
|
|
||||||
string::size_type pos = addr.find(']');
|
|
||||||
if(pos == string::npos || pos + 2 > addr.size() || addr[pos+1]!=':')
|
|
||||||
@@ -718,6 +719,7 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
|
|
||||||
ourAddr.assign(addr.c_str() + 1, pos-1);
|
|
||||||
try {
|
|
||||||
port = pdns_stou(addr.substr(pos+2));
|
|
||||||
+ portSet = true;
|
|
||||||
}
|
|
||||||
catch(std::out_of_range) {
|
|
||||||
return -1;
|
|
||||||
@@ -744,12 +746,12 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
|
|
||||||
freeaddrinfo(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if(port > 65535)
|
|
||||||
- // negative ports are found with the pdns_stou above
|
|
||||||
- return -1;
|
|
||||||
+ if(portSet) {
|
|
||||||
+ if(port > 65535)
|
|
||||||
+ return -1;
|
|
||||||
|
|
||||||
- if(port >= 0)
|
|
||||||
ret->sin6_port = htons(port);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
From 00c6f2b9f5173c98cc883332f5ecf8b941715abc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Remi Gacogne <remi.gacogne@powerdns.com>
|
|
||||||
Date: Fri, 13 Jan 2017 14:02:19 +0100
|
|
||||||
Subject: [PATCH] Fix AtomicCounter unit tests on 32-bit
|
|
||||||
|
|
||||||
---
|
|
||||||
pdns/misc.hh | 3 ++-
|
|
||||||
pdns/test-statbag_cc.cc | 4 ++--
|
|
||||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pdns/misc.hh b/pdns/misc.hh
|
|
||||||
index 50e8dca..2e0e65a 100644
|
|
||||||
--- a/pdns/misc.hh
|
|
||||||
+++ b/pdns/misc.hh
|
|
||||||
@@ -373,7 +373,8 @@ inline bool pdns_iequals_ch(const char a, const char b)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-typedef std::atomic<unsigned long> AtomicCounter ;
|
|
||||||
+typedef unsigned long AtomicCounterInner;
|
|
||||||
+typedef std::atomic<AtomicCounterInner> AtomicCounter ;
|
|
||||||
|
|
||||||
// FIXME400 this should probably go?
|
|
||||||
struct CIStringCompare: public std::binary_function<string, string, bool>
|
|
||||||
diff --git a/pdns/test-statbag_cc.cc b/pdns/test-statbag_cc.cc
|
|
||||||
index 3330451..4abbcd0 100644
|
|
||||||
--- a/pdns/test-statbag_cc.cc
|
|
||||||
+++ b/pdns/test-statbag_cc.cc
|
|
||||||
@@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(test_StatBagBasic) {
|
|
||||||
|
|
||||||
#ifdef UINTPTR_MAX
|
|
||||||
#if UINTPTR_MAX > 0xffffffffULL
|
|
||||||
- BOOST_CHECK_EQUAL(sizeof(unsigned long), 8);
|
|
||||||
+ BOOST_CHECK_EQUAL(sizeof(AtomicCounterInner), 8);
|
|
||||||
s.set("c", 1ULL<<33);
|
|
||||||
BOOST_CHECK_EQUAL(s.read("c"), (1ULL<<33) );
|
|
||||||
s.inc("c");
|
|
||||||
@@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(test_StatBagBasic) {
|
|
||||||
s.inc("c");
|
|
||||||
BOOST_CHECK_EQUAL(s.read("c"), 0 );
|
|
||||||
#else
|
|
||||||
- BOOST_CHECK_EQUAL(sizeof(AtomicCounter::native_t), 4);
|
|
||||||
+ BOOST_CHECK_EQUAL(sizeof(AtomicCounterInner), 4);
|
|
||||||
BOOST_CHECK_EQUAL(~0UL, 0xffffffffUL);
|
|
||||||
s.set("c", ~0UL);
|
|
||||||
BOOST_CHECK_EQUAL(s.read("c"), 0xffffffffUL );
|
|
@ -1,22 +0,0 @@
|
|||||||
From f226db2f2c12a2c0c16b3125a0438d9aca0d017c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pieter Lexis <pieter.lexis@powerdns.com>
|
|
||||||
Date: Fri, 23 Sep 2016 17:09:11 +0200
|
|
||||||
Subject: [PATCH] Silence a GCC 6.2 compiler warning
|
|
||||||
|
|
||||||
---
|
|
||||||
pdns/recpacketcache.cc | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pdns/recpacketcache.cc b/pdns/recpacketcache.cc
|
|
||||||
index 811d0a7..1d24831 100644
|
|
||||||
--- a/pdns/recpacketcache.cc
|
|
||||||
+++ b/pdns/recpacketcache.cc
|
|
||||||
@@ -211,7 +211,7 @@ uint64_t RecursorPacketCache::size()
|
|
||||||
uint64_t RecursorPacketCache::bytes()
|
|
||||||
{
|
|
||||||
uint64_t sum=0;
|
|
||||||
- for(const struct Entry& e : d_packetCache) {
|
|
||||||
+ for(const auto& e : d_packetCache) {
|
|
||||||
sum += sizeof(e) + e.d_packet.length() + 4;
|
|
||||||
}
|
|
||||||
return sum;
|
|
13
pdns.spec
13
pdns.spec
@ -2,8 +2,8 @@
|
|||||||
%global backends %{nil}
|
%global backends %{nil}
|
||||||
|
|
||||||
Name: pdns
|
Name: pdns
|
||||||
Version: 4.0.3
|
Version: 4.0.4
|
||||||
Release: 7%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A modern, advanced and high performance authoritative-only nameserver
|
Summary: A modern, advanced and high performance authoritative-only nameserver
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -11,9 +11,6 @@ URL: http://powerdns.com
|
|||||||
Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
|
Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.bz2
|
||||||
Source1: pdns.service
|
Source1: pdns.service
|
||||||
Patch0: pdns-disable-secpoll.patch
|
Patch0: pdns-disable-secpoll.patch
|
||||||
Patch1: fix-unit-tests-32bit.patch
|
|
||||||
Patch2: fix-negative-ipv6-32bit.patch
|
|
||||||
Patch3: pdns-gcc70.patch
|
|
||||||
|
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
Requires(post): systemd-units
|
Requires(post): systemd-units
|
||||||
@ -155,9 +152,6 @@ This package contains the TinyDNS backend for %{name}
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .disable-secpoll
|
%patch0 -p1 -b .disable-secpoll
|
||||||
%patch1 -p1 -b .fix-unit-tests-32bit
|
|
||||||
%patch2 -p1 -b .fix-negative-ipv6-32bit
|
|
||||||
%patch3 -p1 -b .gcc70
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CPPFLAGS="-DLDAP_DEPRECATED"
|
export CPPFLAGS="-DLDAP_DEPRECATED"
|
||||||
@ -319,6 +313,9 @@ exit 0
|
|||||||
%{_libdir}/%{name}/libtinydnsbackend.so
|
%{_libdir}/%{name}/libtinydnsbackend.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 23 2017 Morten Stevens <mstevens@fedoraproject.org> - 4.0.4-1
|
||||||
|
- Update to 4.0.4
|
||||||
|
|
||||||
* Mon Jun 19 2017 Morten Stevens <mstevens@fedoraproject.org> - 4.0.3-7
|
* Mon Jun 19 2017 Morten Stevens <mstevens@fedoraproject.org> - 4.0.3-7
|
||||||
- Rebuilt for pandoc
|
- Rebuilt for pandoc
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pdns-4.0.3.tar.bz2) = 58d33ac6cf457a916bae6abd8d2dc17f76fbcd1bd9e649948584dd669f5596b43e3e4d91841700ea1ea2cd1ac102749e503cd9075273540f33a2321e20d8bfc2
|
SHA512 (pdns-4.0.4.tar.bz2) = 4ef4705cd990b03976775167c7c37850d45907e198549feda5f5701172e008e3f1f74a35a9bebdb24b63dec15ff63cb2cc9dfc8f92e4e1012e0539c5a88b845b
|
||||||
|
Loading…
Reference in New Issue
Block a user