]> granicus.if.org Git - pdns/log
pdns
7 years agoinitial stab at signer testing; has one 8080 test vector for now
Peter van Dijk [Sat, 17 Jun 2017 17:01:52 +0000 (19:01 +0200)]
initial stab at signer testing; has one 8080 test vector for now

7 years agodon't use the libdecaf ed25519 signer when libsodium is enabled
Kees Monshouwer [Wed, 21 Jun 2017 12:23:34 +0000 (14:23 +0200)]
don't use the libdecaf ed25519 signer when libsodium is enabled

7 years agohello decaf signers (ED25519 and ED448)
Kees Monshouwer [Sat, 17 Jun 2017 15:31:41 +0000 (17:31 +0200)]
hello decaf signers (ED25519 and ED448)
Testing algorithm 15: 'Decaf ED25519' ->'Decaf ED25519' -> 'Decaf ED25519' Signature & verify ok, signature 68usec, verify 93usec
Testing algorithm 16: 'Decaf ED448' ->'Decaf ED448' -> 'Decaf ED448' Signature & verify ok, signature 163usec, verify 252usec

7 years agoMerge pull request #5411 from Habbie/4.0.x-5401
Peter van Dijk [Mon, 19 Jun 2017 15:12:00 +0000 (17:12 +0200)]
Merge pull request #5411 from Habbie/4.0.x-5401

unbreak quoting; fixes #5401

7 years agoMerge pull request #5424 from mind04/ed25519-r40
Peter van Dijk [Mon, 19 Jun 2017 14:46:21 +0000 (16:46 +0200)]
Merge pull request #5424 from mind04/ed25519-r40

Backport of #5422 do not hash the message in the ed25519 signer

7 years agodo not hash the message in the ed25519 signer
Kees Monshouwer [Fri, 16 Jun 2017 20:29:13 +0000 (22:29 +0200)]
do not hash the message in the ed25519 signer

https://www.rfc-editor.org/errata_search.php?rfc=8080

This is a Native zone
Metadata items: None
Zone has NSEC semantics
keys:
ID = 1 (CSK), flags = 257, tag = 3613, algo = 15, bits = 256      Active ( ED25519 )
CSK DNSKEY = example.com. IN DNSKEY 257 3 15 l02Woi0iS8Aa25FQkUd9RMzZHJpBoRQwAQEX1SxZJA4= ; ( ED25519 )
DS = example.com. IN DS 3613 15 1 b2c63605467c4a40942b47a953e9c0d38f81083a ; ( SHA1 digest )
DS = example.com. IN DS 3613 15 2 3aa5ab37efce57f737fc1627013fee07bdf241bd10f3b1964ab55c78e79a304b ; ( SHA256 digest )
DS = example.com. IN DS 3613 15 4 89389da437fca8372e67359dfc0dd4428fa2615df6e31bc5501677dd068514fea5c4efaf82188530a8a1645d9d3ef884 ; ( SHA-384 digest )

DNSKEY and DS match

7 years agoMerge pull request #5405 from rgacogne/rec40-disable-use-incoming-ecs
Peter van Dijk [Thu, 15 Jun 2017 12:30:59 +0000 (14:30 +0200)]
Merge pull request #5405 from rgacogne/rec40-disable-use-incoming-ecs

Backport #5402: rec: Disable use-incoming-edns-subnet by default

7 years agounbreak quoting; fixes #5401
Peter van Dijk [Thu, 15 Jun 2017 07:36:57 +0000 (09:36 +0200)]
unbreak quoting; fixes #5401

7 years agorec: Disable use-incoming-edns-subnet by default
Remi Gacogne [Wed, 14 Jun 2017 12:26:18 +0000 (14:26 +0200)]
rec: Disable use-incoming-edns-subnet by default

(cherry picked from commit a16c4536496ab0d3cf959bcb45e7a6cf41d02e3e)

7 years agoMerge pull request #5392 from pieterlexis/rec-405-sync-boost-m4 rec-4.0.5
Pieter Lexis [Tue, 13 Jun 2017 09:50:50 +0000 (11:50 +0200)]
Merge pull request #5392 from pieterlexis/rec-405-sync-boost-m4

Sync boost.m4 from master

7 years agoSync boost.m4 from master
Pieter Lexis [Tue, 13 Jun 2017 08:26:54 +0000 (10:26 +0200)]
Sync boost.m4 from master

7 years agoMerge pull request #5355 from rgacogne/rec40-backport-4924-1988 rec-4.0.5-rc2
Pieter Lexis [Thu, 1 Jun 2017 09:33:28 +0000 (11:33 +0200)]
Merge pull request #5355 from rgacogne/rec40-backport-4924-1988

rec-4.0.x: Backport #4924 and #4988

7 years agoMerge pull request #5345 from shinsterneck/backport-5335-rec-4.0.x
Pieter Lexis [Thu, 1 Jun 2017 09:33:19 +0000 (11:33 +0200)]
Merge pull request #5345 from shinsterneck/backport-5335-rec-4.0.x

Backport of #5335 to rec-4.0.x: configure.ac: corrects syntax error in test statement on existance of libcrypto_ecdsa

7 years agorec: Add `use-incoming-edns-subnet` to process and pass along ECS
Remi Gacogne [Thu, 9 Feb 2017 14:01:41 +0000 (15:01 +0100)]
rec: Add `use-incoming-edns-subnet` to process and pass along ECS

If set, the recusor will process and pass along a received EDNS
Client Subnet to authoritative servers.
The ECS information will only be sent for netmasks and domains listed
in `edns-subnet-whitelist`, and will be truncated if the received scope
exceeds `ecs-ipv4-bits` for IPv4 or `ecs-ipv6-bits` for IPv6.
An incoming ECS source prefix-length of 0 can also be used to
request that no ECS value be sent to the authoritative servers,
in accordance with RFC7871.

(cherry picked from commit b40562da39e3be0dcf193163c386eef369dcc4af)

7 years agoCorrectly parse ECS with a source prefix-length value of 0
Remi Gacogne [Thu, 9 Feb 2017 13:50:11 +0000 (14:50 +0100)]
Correctly parse ECS with a source prefix-length value of 0

It means there is no address there, but the family and source
prefix-length values are still relevant. rfc7871 explicitly says
that the family SHOULD be set to the transport over which the query
is sent if source prefix-length is 0.
It also states that a source prefix-length means the client is
asking that no ECS value be sent.

(cherry picked from commit 53221eafae3fe410586daf98cca0df3d81ea344c)

7 years agoadd iputils.cc to remotebackend tests
bert hubert [Wed, 18 Jan 2017 17:49:51 +0000 (18:49 +0100)]
add iputils.cc to remotebackend tests

(cherry picked from commit 4d541cb1bf211c1a707d34691ea0f3329be0bf1f)

7 years agolink in iputils.o in places that need it now for truncation of netmask
bert hubert [Wed, 18 Jan 2017 17:18:00 +0000 (18:18 +0100)]
link in iputils.o in places that need it now for truncation of netmask

(cherry picked from commit 4ba0ebc5fe17ea9263ade38d4e76b63072397296)

7 years agoadd ecs-ipv4-bits and ecs-ipv6-bits tunables for EDNS Client Subnet & document them...
bert hubert [Wed, 18 Jan 2017 15:18:46 +0000 (16:18 +0100)]
add ecs-ipv4-bits and ecs-ipv6-bits tunables for EDNS Client Subnet & document them. Split out ECS code from pdns_recursor.cc.

(cherry picked from commit 35695d184316e0686d1dc2d50ef4a4420bc95157)

7 years agomake EDNS client subnet do some better logging on --trace
bert hubert [Wed, 18 Jan 2017 15:18:23 +0000 (16:18 +0100)]
make EDNS client subnet do some better logging on --trace

(cherry picked from commit 43f759413685af3cc06587c3631009eea3434396)

7 years agoComboAddress truncate() is assumed to never throw. Enforce this.
bert hubert [Wed, 18 Jan 2017 15:17:06 +0000 (16:17 +0100)]
ComboAddress truncate() is assumed to never throw. Enforce this.

(cherry picked from commit 5b6099b2397c1b5a4789235ad5c06ac83ecfa818)

7 years agoEDNS Client Subnet parser delivered 'over precise' netmasks, like 1.2.3.4/16. This...
bert hubert [Wed, 18 Jan 2017 15:16:19 +0000 (16:16 +0100)]
EDNS Client Subnet parser delivered 'over precise' netmasks, like 1.2.3.4/16. This might have caused problems, but at the very least looks odd. We truncate now.

(cherry picked from commit b85f49a0aa392d40f00e134708c2e12aa1231870)

8 years agocorrects syntax error in test statement on existance of libcrypto_ecdsa
Shin Sterneck [Tue, 23 May 2017 00:12:26 +0000 (09:12 +0900)]
corrects syntax error in test statement on existance of libcrypto_ecdsa

(cherry picked from commit 8189c881e5ebaa13f5f14d9345335d656bd34e43)

8 years agoUse un-annotated tags for determining version rec-4.0.5-rc1
Pieter Lexis [Thu, 18 May 2017 09:08:55 +0000 (11:08 +0200)]
Use un-annotated tags for determining version

8 years agoMerge pull request #5304 from pieterlexis/rec-405-backports
Pieter Lexis [Thu, 18 May 2017 08:23:33 +0000 (10:23 +0200)]
Merge pull request #5304 from pieterlexis/rec-405-backports

Recursor backports

8 years agoRecursor 4.0.5: Backport #5319
Pieter Lexis [Wed, 17 May 2017 19:22:41 +0000 (21:22 +0200)]
Recursor 4.0.5: Backport #5319

8 years agorec: Only check the netmask for subnet specific cache entries
Remi Gacogne [Fri, 12 May 2017 12:12:10 +0000 (14:12 +0200)]
rec: Only check the netmask for subnet specific cache entries

We used to check the netmask for all entries for a qname
if at least one of them was a subnet specific one. Since an empty
`Netmask` doesn't match anything, we would effectively ignore every
non subnet specific entries if we had at least one subnet specific
one.
This caused a very hard to reproduce issue with for example
f.root-servers.net that includes an EDNS Client Subnet option in its
answer for `NS .` if the query has an EDNS Client Subnet option.
This caused the recursor to cache a subnet specific entry for `NS .`.
When that entry expired, we retrieved and cached a non subnet specific
one, but that new one was ignored as long as the subnet specific
was not expunged from the cache.
Under certain circumstances that could cause a root refresh loop
using a lot of stack memory.

(cherry picked from commit 65fdd185f4930f685b87340d29535f40d8b52fb3)

8 years agoMerge pull request #5324 from rgacogne/rec40-yahttp-backports
Pieter Lexis [Wed, 17 May 2017 08:04:34 +0000 (10:04 +0200)]
Merge pull request #5324 from rgacogne/rec40-yahttp-backports

rec-4.0.x: YaHTTP: Sync with upstream changes

8 years agoYaHTTP: Sync with upstream changes
Remi Gacogne [Mon, 15 May 2017 10:50:24 +0000 (12:50 +0200)]
YaHTTP: Sync with upstream changes

Backport changes from upstream up to c5b83288a4c2f8ec07cb8cb7bd150f2210db67b6
"Add missing `YaHTTP::isdigit()`, fix locale-enabled versions"

8 years agoRecursor 4.0.5: Backport #5318
Pieter Lexis [Sat, 13 May 2017 09:42:32 +0000 (11:42 +0200)]
Recursor 4.0.5: Backport #5318

8 years agowhen (re)priming the root, we do so with auth=0. We'll only set auth=1 after we have...
bert hubert [Fri, 12 May 2017 10:34:44 +0000 (12:34 +0200)]
when (re)priming the root, we do so with auth=0. We'll only set auth=1 after we have an answer from the roots. This however opens up a small race condition in which the root is expired (ttl=0), but still auth=1 in the cache. Our attempt to replace it with auth=0 dta fails at that point. This is probably due to some fencepost error somewhere. To not be subtle about this, explicitly nuke the root when we reprime.

(cherry picked from commit 0d032a66afe508cc86a25eef26fc9be0867a117e)

8 years agoRecursor 4.0.5: Backport #5304
Pieter Lexis [Sat, 13 May 2017 08:16:37 +0000 (10:16 +0200)]
Recursor 4.0.5: Backport #5304

8 years agodon't age the root - this was a mistranslation from 3.x to 4.x
bert hubert [Thu, 11 May 2017 15:18:04 +0000 (17:18 +0200)]
don't age the root - this was a mistranslation from 3.x to 4.x

(cherry picked from commit 03c09afecec7098a605a632606600bca2992dfaf)

8 years agoRecursor 4.0.5: Backport #5312
Pieter Lexis [Sat, 13 May 2017 07:58:40 +0000 (09:58 +0200)]
Recursor 4.0.5: Backport #5312

8 years agowe would attempt to protobuf log DNS questions without a set question and get excepti...
bert hubert [Thu, 11 May 2017 15:16:20 +0000 (17:16 +0200)]
we would attempt to protobuf log DNS questions without a set question and get exceptions over that

(cherry picked from commit da5bcd9d891418b9462c76fbc87fd7e18fa374c8)

8 years agoMerge pull request #5300 from rgacogne/rec40-dnssec-cache-auth
Pieter Lexis [Tue, 9 May 2017 14:24:04 +0000 (16:24 +0200)]
Merge pull request #5300 from rgacogne/rec40-dnssec-cache-auth

Backport #5283: rec: Skip DNSSEC validation for cache hits from authoritative zones

8 years agoRecursor 4.0.5: Backport #5265
Pieter Lexis [Tue, 9 May 2017 12:54:25 +0000 (14:54 +0200)]
Recursor 4.0.5: Backport #5265

8 years agorec: Add support for RPZ wildcarded target names
Remi Gacogne [Sun, 23 Apr 2017 18:56:36 +0000 (20:56 +0200)]
rec: Add support for RPZ wildcarded target names

8 years agoRecursor 4.0.5: Backport #5278
Pieter Lexis [Tue, 9 May 2017 12:18:13 +0000 (14:18 +0200)]
Recursor 4.0.5: Backport #5278

8 years agoAlways wrap DNSCryptoKeyEngine objects in a shared pointer
Remi Gacogne [Thu, 27 Apr 2017 20:41:33 +0000 (22:41 +0200)]
Always wrap DNSCryptoKeyEngine objects in a shared pointer

It's done almost everywhere, but not quite, and some of the paths
where it's not could leak if an exception is raised.
Also mark the overridden virtual methods with `override` to prevent
future mistakes.

(cherry picked from commit e69c2dac28d798813dd8e4a986c5045c63806ef0)

8 years agoRecursor 4.0.5: Backport #5231
Pieter Lexis [Tue, 9 May 2017 10:17:46 +0000 (12:17 +0200)]
Recursor 4.0.5: Backport #5231

8 years agorec: Clear the RPZ NS IP table when clearing the policy
Remi Gacogne [Mon, 10 Apr 2017 16:33:30 +0000 (18:33 +0200)]
rec: Clear the RPZ NS IP table when clearing the policy

Be it the entire policy object or a single zone.

(cherry picked from commit 2ae5639865ca29aa0c7b722e55e9098b81627700)

8 years agoRcursor 4.0.5: Backport #5218
Pieter Lexis [Tue, 9 May 2017 10:12:24 +0000 (12:12 +0200)]
Rcursor 4.0.5: Backport #5218

8 years agorec: Fix cache-only queries against a forward-zone
Remi Gacogne [Mon, 3 Apr 2017 08:53:41 +0000 (10:53 +0200)]
rec: Fix cache-only queries against a forward-zone

We used to pass the return code from `asyncresolve` directly to the
caller, leading the success code (1) to be interpreted as `RCode::FormErr`.

(cherry picked from commit 6148fa9731f6e4cef35243c8f35399d2b1e89215)

8 years agoRecursor: Backport #5147
Pieter Lexis [Tue, 9 May 2017 10:11:15 +0000 (12:11 +0200)]
Recursor: Backport #5147

8 years agoLuaWrapper: Allow embedded NULs in strings received from Lua
Peter van Dijk [Fri, 10 Mar 2017 09:48:46 +0000 (10:48 +0100)]
LuaWrapper: Allow embedded NULs in strings received from Lua

(cherry picked from commit 448990ab9bd7355f42ff8752a973aff20bdaf4e7)

8 years agoRecursor 4.0.5: Backport #4912
Pieter Lexis [Tue, 9 May 2017 10:02:42 +0000 (12:02 +0200)]
Recursor 4.0.5: Backport #4912

8 years agoRefuse to start with chroot set in a systemd env
Pieter Lexis [Mon, 16 Jan 2017 11:37:13 +0000 (12:37 +0100)]
Refuse to start with chroot set in a systemd env

Closes #4848

(cherry picked from commit 75336810381e4cdc25d0beab7c19abb910cea3ab)

8 years agoRecursor 4.0.5: Backport #4877
Pieter Lexis [Tue, 9 May 2017 09:50:58 +0000 (11:50 +0200)]
Recursor 4.0.5: Backport #4877

8 years agoissue #4579
Roman Dayneko [Wed, 11 Jan 2017 14:46:17 +0000 (16:46 +0200)]
issue #4579

(cherry picked from commit 28fe507d1acc3b4fe7b5669caac9f4bd4a516093)

8 years agoBackport #4873 into Recursor 4.0.5
Pieter Lexis [Tue, 9 May 2017 09:46:41 +0000 (11:46 +0200)]
Backport #4873 into Recursor 4.0.5

8 years agohook up ed25519 signer in the recursor
Kees Monshouwer [Tue, 10 Jan 2017 21:50:12 +0000 (22:50 +0100)]
hook up ed25519 signer in the recursor

(cherry picked from commit d1b28475acae46cf39d2a883791953910b89ea67)

8 years agoupdate Ed25519 algorithm number and mnemonic
Kees Monshouwer [Tue, 10 Jan 2017 15:04:22 +0000 (16:04 +0100)]
update Ed25519 algorithm number and mnemonic
http://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml

(cherry picked from commit 9d3727e0471f132f0294d6944349eb6afb2ba2ab)

8 years agorec: Skip DNSSEC validation for cache hits from authoritative zones
Remi Gacogne [Fri, 28 Apr 2017 17:01:26 +0000 (19:01 +0200)]
rec: Skip DNSSEC validation for cache hits from authoritative zones

(cherry picked from commit 129bb0c322b6a20860c14f0b1bcfcad2bd586389)

8 years agoMerge pull request #5148 from rgacogne/rec40-backport-5139
Peter van Dijk [Mon, 20 Mar 2017 13:07:09 +0000 (14:07 +0100)]
Merge pull request #5148 from rgacogne/rec40-backport-5139

Backport #5139: rec: Run unit tests, split recursor-specific unit tests from the auth

8 years agoMerge pull request #5164 from rgacogne/rec40-backport-5101
Peter van Dijk [Mon, 20 Mar 2017 13:06:20 +0000 (14:06 +0100)]
Merge pull request #5164 from rgacogne/rec40-backport-5101

Backport #5101: rec-4.0.x: Fix minor issues reported by `cppcheck`

8 years agoMerge pull request #5165 from rgacogne/rec40-backport-5058
Peter van Dijk [Mon, 20 Mar 2017 13:06:05 +0000 (14:06 +0100)]
Merge pull request #5165 from rgacogne/rec40-backport-5058

Backport #5058: Rec: Store the RPZ policies in an unordered_map instead of a map

8 years agoMerge pull request #5166 from rgacogne/rec40-backport-5042
Peter van Dijk [Mon, 20 Mar 2017 13:05:19 +0000 (14:05 +0100)]
Merge pull request #5166 from rgacogne/rec40-backport-5042

Backport #5042: StateHolder: Allocate (and copy if needed) before taking the lock

8 years agoStateHolder: Allocate (and copy if needed) before taking the lock
Remi Gacogne [Tue, 14 Feb 2017 17:46:38 +0000 (18:46 +0100)]
StateHolder: Allocate (and copy if needed) before taking the lock

(cherry picked from commit 47678b827e9b20a23352e381b16312f1c29831de)

8 years agoRec: Store the RPZ policies in an unordered_map instead of a map
Remi Gacogne [Mon, 20 Feb 2017 14:45:22 +0000 (15:45 +0100)]
Rec: Store the RPZ policies in an unordered_map instead of a map

This speeds up the loading of huge zones a bit (~20%) while also nicely
improving the lookup speed.
Also adds a `zoneSizeHint` parameter to `rpzFile()` and `rpzMaster()` to be
able to reserve space before loading the zone, to prevent reallocation
and rehashing when possible.

(cherry picked from commit a2d0450ec9fa958308fe0c40499ce28228bb3f00)

8 years agoFix minor issues reported by `cppcheck`
Remi Gacogne [Thu, 2 Mar 2017 14:07:56 +0000 (15:07 +0100)]
Fix minor issues reported by `cppcheck`

(cherry picked from commit d7c676a5d42d5d7e5078a8662d355c9a782bdb51)

8 years agoFix dns_random unit tests with gcc > 4
Remi Gacogne [Wed, 15 Mar 2017 14:42:02 +0000 (15:42 +0100)]
Fix dns_random unit tests with gcc > 4

(cherry picked from commit 4b587bc5a1a25a285c614ae772f0896d65954ad9)

8 years agorec: Run unit tests, split recursor-specific unit tests from the auth
Remi Gacogne [Mon, 13 Mar 2017 12:52:51 +0000 (13:52 +0100)]
rec: Run unit tests, split recursor-specific unit tests from the auth

Some unit tests are common and will be run twice, once in the auth
build and once in the rec one. This ensures that they will be run on
rec-4.0.x and auth-4.0.x branches as well.

(cherry picked from commit 35d883a830af0284efafe94d1a6bd1c1ad04bae7)

8 years agoMerge pull request #4935 from rgacogne/rec40-backport-4911
Pieter Lexis [Fri, 17 Feb 2017 09:59:13 +0000 (10:59 +0100)]
Merge pull request #4935 from rgacogne/rec40-backport-4911

Backport #4911: Fix negative port detection for IPv6 addresses on 32-bit

8 years agoMerge pull request #5047 from rgacogne/rec40-backport-4744
Pieter Lexis [Fri, 17 Feb 2017 09:58:52 +0000 (10:58 +0100)]
Merge pull request #5047 from rgacogne/rec40-backport-4744

backport #4744: Handle exceptions raised by `closesocket()`

8 years agoMerge pull request #5045 from rgacogne/rec40-backport-4917
Pieter Lexis [Fri, 17 Feb 2017 09:58:37 +0000 (10:58 +0100)]
Merge pull request #5045 from rgacogne/rec40-backport-4917

backport #4917: rec: Clean up, fix compiler warnings

8 years agoMerge pull request #4970 from rgacogne/rec40-tsig-canonical-algo
Pieter Lexis [Fri, 17 Feb 2017 09:58:28 +0000 (10:58 +0100)]
Merge pull request #4970 from rgacogne/rec40-tsig-canonical-algo

Backport #4961: Lowercase the TSIG algorithm name in hash computation

8 years agoExplicitely use const iterators in `validateWithKeySet` and `getKeysFor`
Remi Gacogne [Mon, 16 Jan 2017 17:05:34 +0000 (18:05 +0100)]
Explicitely use const iterators in `validateWithKeySet` and `getKeysFor`

(cherry picked from commit 7a4f4632913046afde9e8acbbff1213b8faf982d)

8 years agoMake sure `labelsToAdd` is not empty in `getZoneCuts()`
Remi Gacogne [Mon, 16 Jan 2017 16:53:06 +0000 (17:53 +0100)]
Make sure `labelsToAdd` is not empty in `getZoneCuts()`

(cherry picked from commit e2f91e7051975a411445ebd54a2a124c78a7d8ff)

8 years agoRemove `g_rootDS` leftover
Remi Gacogne [Mon, 16 Jan 2017 16:51:49 +0000 (17:51 +0100)]
Remove `g_rootDS` leftover

(cherry picked from commit 08d5ffac729f6aaa2f63d070a7fcefe42e3c32f4)

8 years agoRemove unused `RemoteLogger::sendData()` leftover
Remi Gacogne [Mon, 16 Jan 2017 16:46:59 +0000 (17:46 +0100)]
Remove unused `RemoteLogger::sendData()` leftover

(cherry picked from commit 59ab41170cee9b95513bdc931a5f125a0c3de205)

8 years agorec: Fix shadowed variables
Remi Gacogne [Mon, 16 Jan 2017 16:45:34 +0000 (17:45 +0100)]
rec: Fix shadowed variables

No real issue here, but I'd like to be able `-Wshadow` to prevent
future mishaps at some point.

(cherry picked from commit dd07976412d9b2b35db7179ceb590e542aff9eef)

8 years agoHandle exceptions raised by `closesocket()`
Remi Gacogne [Mon, 5 Dec 2016 15:42:55 +0000 (16:42 +0100)]
Handle exceptions raised by `closesocket()`

This was not very well handled, and could cause the PowerDNS process
to terminate. This is especially nasty when `closesocket()` is called
from a destructor, as we could already be dealing with an exception.

(cherry picked from commit a7b68ae7e414ec9f3184df70ac8008f8a310ae60)

8 years agoMerge pull request #5034 from pieterlexis/rec-backport-4508
Pieter Lexis [Thu, 16 Feb 2017 11:22:23 +0000 (12:22 +0100)]
Merge pull request #5034 from pieterlexis/rec-backport-4508

Backport #4508: Revert "Merge pull request #947 from mind04/right" (rec)

8 years agoMerge pull request #5028 from pieterlexis/backport-4619
Pieter Lexis [Thu, 16 Feb 2017 11:22:16 +0000 (12:22 +0100)]
Merge pull request #5028 from pieterlexis/backport-4619

Backport #4619: Document the -pub- variants

8 years agoMerge pull request #5023 from pieterlexis/backport-4767
Pieter Lexis [Thu, 16 Feb 2017 11:22:09 +0000 (12:22 +0100)]
Merge pull request #5023 from pieterlexis/backport-4767

Backport #4767: hide ttl in RPZ tests to avoid random failures

8 years agoMerge pull request #5035 from pieterlexis/backport-4794
Pieter Lexis [Thu, 16 Feb 2017 11:21:50 +0000 (12:21 +0100)]
Merge pull request #5035 from pieterlexis/backport-4794

Backport #4794: RPZ: some logging fixes

8 years agoMerge pull request #5031 from pieterlexis/backport-4603
Pieter Lexis [Thu, 16 Feb 2017 11:21:13 +0000 (12:21 +0100)]
Merge pull request #5031 from pieterlexis/backport-4603

Backport #4603: g.root-servers.net added IPv6

8 years agoMerge pull request #5025 from pieterlexis/rec-backport-4762
Pieter Lexis [Thu, 16 Feb 2017 11:20:28 +0000 (12:20 +0100)]
Merge pull request #5025 from pieterlexis/rec-backport-4762

Backport #4762: SuffixMatchNode: Fix insertion issue for an existing node (rec)

8 years agoMerge pull request #5022 from pieterlexis/backport-4775
Pieter Lexis [Thu, 16 Feb 2017 11:19:39 +0000 (12:19 +0100)]
Merge pull request #5022 from pieterlexis/backport-4775

Backport #4775: LuaWrapper: Use the correct index when storing a function

8 years agoMerge pull request #5021 from pieterlexis/backport-4777
Pieter Lexis [Thu, 16 Feb 2017 11:19:28 +0000 (12:19 +0100)]
Merge pull request #5021 from pieterlexis/backport-4777

Backport #4777: only delegate if NS's are below apex in auth-zones

8 years agoMerge pull request #5020 from pieterlexis/rec-backport-4793
Pieter Lexis [Thu, 16 Feb 2017 11:19:16 +0000 (12:19 +0100)]
Merge pull request #5020 from pieterlexis/rec-backport-4793

Backport #4793: Don't call `hostname -f` on openbsd (rec)

8 years agoMerge pull request #5018 from pieterlexis/backport-4804
Pieter Lexis [Thu, 16 Feb 2017 11:19:02 +0000 (12:19 +0100)]
Merge pull request #5018 from pieterlexis/backport-4804

Backport #4804: remove hardcoding of port 53 for TCP/IP forwarded zones in recursor, …

8 years agoMerge pull request #5017 from pieterlexis/rec-backport-4838
Pieter Lexis [Thu, 16 Feb 2017 11:18:50 +0000 (12:18 +0100)]
Merge pull request #5017 from pieterlexis/rec-backport-4838

backport #4838: Check if we can link against libatomic if needed (rec)

8 years agoMerge pull request #5014 from pieterlexis/rec-backport-4868
Pieter Lexis [Thu, 16 Feb 2017 11:18:26 +0000 (12:18 +0100)]
Merge pull request #5014 from pieterlexis/rec-backport-4868

Backport #4868: Document that carbon-server requires IP address, no hostname accepted. (rec)

8 years agoMerge pull request #5012 from pieterlexis/rec-backport-4879
Pieter Lexis [Thu, 16 Feb 2017 11:18:11 +0000 (12:18 +0100)]
Merge pull request #5012 from pieterlexis/rec-backport-4879

Backport #4879: Remove a relative import in yahttp-config.h (rec)

8 years agoMerge pull request #5010 from pieterlexis/backport-4940
Pieter Lexis [Thu, 16 Feb 2017 11:17:43 +0000 (12:17 +0100)]
Merge pull request #5010 from pieterlexis/backport-4940

Backport #4940: Backport json11 fixes from upstream

8 years agoMerge pull request #5009 from pieterlexis/backport-4972
Pieter Lexis [Thu, 16 Feb 2017 09:03:29 +0000 (10:03 +0100)]
Merge pull request #5009 from pieterlexis/backport-4972

Backport #4972: Add the 2017 root key

8 years agoUpdate the manpage as well
phonedph1 [Tue, 25 Oct 2016 01:59:23 +0000 (01:59 +0000)]
Update the manpage as well

(cherry picked from commit 6c9a5b516f73edf5a6f6ec931eea1967090ee48f)

8 years agoRPZ: log additions/removals at degug, not info
Pieter Lexis [Mon, 19 Dec 2016 17:30:49 +0000 (18:30 +0100)]
RPZ: log additions/removals at degug, not info

(cherry picked from commit 610d8343deba239edbb88f3f17d3e4118bc782ac)

8 years agoUnconfuse the RPZ summary
Pieter Lexis [Mon, 19 Dec 2016 17:20:47 +0000 (18:20 +0100)]
Unconfuse the RPZ summary

Closes #4342

(cherry picked from commit 00febe394033d2ea53ecbcf135ac94de6ba4be08)

8 years agoRevert "Merge pull request #947 from mind04/right"
Peter van Dijk [Mon, 26 Sep 2016 12:52:10 +0000 (14:52 +0200)]
Revert "Merge pull request #947 from mind04/right"

This code only served to fix a combination of system misconfiguration and a
bug in glibc. Meanwhile it turns out this code is incorrect. Removing it.

(cherry picked from commit c96765dae8da4c9322ca4a80e3e101d64faf141f)

8 years agog.root-servers.net added IPv6
Kevin Otte [Fri, 21 Oct 2016 12:41:11 +0000 (08:41 -0400)]
g.root-servers.net added IPv6

http://www.internic.net/domain/db.cache
last update:    October 20, 2016

8 years agoDocument the -pub- variants
phonedph1 [Tue, 25 Oct 2016 01:52:13 +0000 (01:52 +0000)]
Document the -pub- variants

8 years agoSuffixMatchNode: Fix insertion issue for an existing node
Remi Gacogne [Mon, 12 Dec 2016 16:16:11 +0000 (17:16 +0100)]
SuffixMatchNode: Fix insertion issue for an existing node

If the node we are about to insert already existed as an intermediary
one, we need to mark it as an end node.

(cherry picked from commit ed221d0bc700158c21fcb8fc4463085713d07c53)

8 years agohide ttl in RPZ tests to avoid random failures
Peter van Dijk [Tue, 13 Dec 2016 13:35:07 +0000 (14:35 +0100)]
hide ttl in RPZ tests to avoid random failures

(cherry picked from commit 41eac9c12f28cc7a07a45ae0abe86ba390802e06)

8 years agoLuaWrapper: Fix comments since `ValueInRegistry` now takes an optional index
Remi Gacogne [Mon, 19 Dec 2016 17:08:29 +0000 (18:08 +0100)]
LuaWrapper: Fix comments since `ValueInRegistry` now takes an optional index

(cherry picked from commit 28abe7558fd5c0d853a7544f49fb780aafbc49f3)

8 years agoLuaWrapper: Use the correct index when storing a function
Remi Gacogne [Fri, 16 Dec 2016 13:39:46 +0000 (14:39 +0100)]
LuaWrapper: Use the correct index when storing a function

The LuaWrapper used to assume that the function was at the
top of the stack, making it effectively impossible to have
a callback function parameter anywhere else than as the last
parameter.

(cherry picked from commit 4ec1e17418d539cea7eb4fb5469e905684ca6457)

8 years agorec: only delegate if NS's are below apex in auth-zones
Pieter Lexis [Fri, 16 Dec 2016 14:24:13 +0000 (15:24 +0100)]
rec: only delegate if NS's are below apex in auth-zones

As:
 1. we **are** authoritative for the zone named at the apex
 2. We would servfail because we could get an upward referral

Closes #4771

(cherry picked from commit 221a3f72e117a0e0fdf9e4fedf237a8e6526d145)

8 years agoDon't call `hostname -f` on openbsd
Pieter Lexis [Mon, 19 Dec 2016 17:02:24 +0000 (18:02 +0100)]
Don't call `hostname -f` on openbsd

Closes #2579

(cherry picked from commit df925537cfe0a4706b85353376da6f12996871bb)

8 years agoremove hardcoding of port 53 for TCP/IP forwarded zones in recursor, to address ...
bert hubert [Wed, 21 Dec 2016 13:07:56 +0000 (14:07 +0100)]
remove hardcoding of port 53 for TCP/IP forwarded zones in recursor, to address #4799

(cherry picked from commit 1bde6efa9fa0331dbd431fb42f208b4df530d88c)