]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
5 years agodnsdist: Don't overwrite DoH frontends with 'setLocal()' 8848/head
Remi Gacogne [Thu, 20 Feb 2020 15:03:39 +0000 (16:03 +0100)] 
dnsdist: Don't overwrite DoH frontends with 'setLocal()'

5 years agodnsdist: Add get*BindCount() functions
Remi Gacogne [Thu, 20 Feb 2020 15:02:33 +0000 (16:02 +0100)] 
dnsdist: Add get*BindCount() functions

Allow getting the number of binds of each kind to be able to iterate
over them.

5 years agoMerge pull request #8840 from omoerbeek/tests-fix-compile-warnings
Otto Moerbeek [Wed, 19 Feb 2020 08:45:27 +0000 (09:45 +0100)] 
Merge pull request #8840 from omoerbeek/tests-fix-compile-warnings

Fix unsigned vs signed warnings spotted by clang on OpenBSD

5 years agoMerge pull request #8838 from omoerbeek/dnsdist-no-snmp
Otto Moerbeek [Wed, 19 Feb 2020 08:45:04 +0000 (09:45 +0100)] 
Merge pull request #8838 from omoerbeek/dnsdist-no-snmp

dnsdist: Fix compile errors without snmp support

5 years agoFix unsigned vs signed warnings spotted by clang on OpenBSD 8840/head
Otto Moerbeek [Tue, 18 Feb 2020 16:26:24 +0000 (17:26 +0100)] 
Fix unsigned vs signed warnings spotted by clang on OpenBSD

(which is more picky than others)

5 years agoFix compile errors without snmp support 8838/head
Otto Moerbeek [Tue, 18 Feb 2020 15:37:27 +0000 (16:37 +0100)] 
Fix compile errors without snmp support

5 years agoMerge pull request #8631 from zeha/once auth-4.3.0-beta2
Otto Moerbeek [Tue, 18 Feb 2020 15:09:26 +0000 (16:09 +0100)] 
Merge pull request #8631 from zeha/once

Replace include guard ifdef/define with pragma once

5 years agoMerge pull request #8505 from rgacogne/dnsdist-lua-ffi
Remi Gacogne [Tue, 18 Feb 2020 13:37:11 +0000 (14:37 +0100)] 
Merge pull request #8505 from rgacogne/dnsdist-lua-ffi

dnsdist: Implement LuaFFIRule, LuaFFIAction and LuaFFIResponseAction

5 years agoMerge pull request #8835 from omoerbeek/rec-prep-4.3.0-rc2
Otto Moerbeek [Tue, 18 Feb 2020 10:48:48 +0000 (11:48 +0100)] 
Merge pull request #8835 from omoerbeek/rec-prep-4.3.0-rc2

rec: Prep for rec-4.3.0-rc2

5 years agoPrep for rec-4.3.0-rc2 8835/head
Otto Moerbeek [Tue, 18 Feb 2020 07:26:26 +0000 (08:26 +0100)] 
Prep for rec-4.3.0-rc2

5 years agodnsdist: Add a comment about the lack of guard in dnsdist-lua-ffi-interface.h 8505/head
Remi Gacogne [Tue, 18 Feb 2020 09:37:54 +0000 (10:37 +0100)] 
dnsdist: Add a comment about the lack of guard in dnsdist-lua-ffi-interface.h

Reported by LGTM.

5 years agoMerge pull request #8833 from rgacogne/pgsql-circleci-trust
Peter van Dijk [Mon, 17 Feb 2020 19:20:05 +0000 (20:20 +0100)] 
Merge pull request #8833 from rgacogne/pgsql-circleci-trust

Allow all connections to the PG server in Circle CI

5 years agoAllow all connections to the PG server in Circle CI 8833/head
Remi Gacogne [Mon, 17 Feb 2020 14:11:29 +0000 (15:11 +0100)] 
Allow all connections to the PG server in Circle CI

5 years agoMerge pull request #8830 from omoerbeek/rec-init-zone-prio
Otto Moerbeek [Mon, 17 Feb 2020 08:39:54 +0000 (09:39 +0100)] 
Merge pull request #8830 from omoerbeek/rec-init-zone-prio

rec: Init zone's d_priority field.

5 years agoInit zone's d_priority field. 8830/head
Otto Moerbeek [Mon, 17 Feb 2020 08:38:10 +0000 (09:38 +0100)] 
Init zone's d_priority field.

5 years agoMerge pull request #8811 from Habbie/nsec-ttl
Peter van Dijk [Sat, 15 Feb 2020 22:01:00 +0000 (23:01 +0100)] 
Merge pull request #8811 from Habbie/nsec-ttl

adjust NSEC TTLs to negative TTL

5 years agoMerge pull request #8776 from mnordhoff/4.3-schema
Peter van Dijk [Sat, 15 Feb 2020 21:50:34 +0000 (22:50 +0100)] 
Merge pull request #8776 from mnordhoff/4.3-schema

auth: Add more SQL schema files to packages and tarballs

5 years agoadd upgrade notes for the new NSEC(3) TTLs 8811/head
Peter van Dijk [Fri, 14 Feb 2020 19:52:08 +0000 (20:52 +0100)] 
add upgrade notes for the new NSEC(3) TTLs

5 years agoupdate DNSSEC TTL notes
Peter van Dijk [Fri, 14 Feb 2020 19:45:31 +0000 (20:45 +0100)] 
update DNSSEC TTL notes

5 years agoadjust NSEC TTLs to negative TTL
Peter van Dijk [Tue, 11 Feb 2020 13:34:31 +0000 (14:34 +0100)] 
adjust NSEC TTLs to negative TTL

5 years agoMerge pull request #8828 from Habbie/qdcount-zero-debug
Peter van Dijk [Fri, 14 Feb 2020 18:46:29 +0000 (19:46 +0100)] 
Merge pull request #8828 from Habbie/qdcount-zero-debug

auth: log "No question section in packet" at Debug. Fixes #7970

5 years agoMerge pull request #8096 from mind04/pdns-notify-db-queries
Peter van Dijk [Fri, 14 Feb 2020 18:22:32 +0000 (19:22 +0100)] 
Merge pull request #8096 from mind04/pdns-notify-db-queries

auth: do not update identical notified serials

5 years agoMerge pull request #8826 from rgacogne/nsec-invalid-bitmap-len
Peter van Dijk [Fri, 14 Feb 2020 16:46:59 +0000 (17:46 +0100)] 
Merge pull request #8826 from rgacogne/nsec-invalid-bitmap-len

Refuse NSEC records with a bitmap length > 32

5 years agoauth: log "No question section in packet" at Debug. Fixes #7970 8828/head
Peter van Dijk [Fri, 14 Feb 2020 16:08:35 +0000 (17:08 +0100)] 
auth: log "No question section in packet" at Debug. Fixes #7970

5 years agoDeduplicate EXTRA_DIST and dist_doc_DATA in modified Makefile.ams 8776/head
Matt Nordhoff [Wed, 12 Feb 2020 14:52:42 +0000 (14:52 +0000)] 
Deduplicate EXTRA_DIST and dist_doc_DATA in modified Makefile.ams

5 years agoauth: Include bind schema files in debs
Matt Nordhoff [Sun, 2 Feb 2020 20:40:10 +0000 (20:40 +0000)] 
auth: Include bind schema files in debs

5 years agoauth: Include bind schema files in pdns RPM
Matt Nordhoff [Sun, 2 Feb 2020 20:14:54 +0000 (20:14 +0000)] 
auth: Include bind schema files in pdns RPM

5 years agoauth: List the 3.4.0+ SQL schema files wherever the older files are.
Matt Nordhoff [Sun, 2 Feb 2020 16:36:34 +0000 (16:36 +0000)] 
auth: List the 3.4.0+ SQL schema files wherever the older files are.

And clean up godbcbackend's Makefile.am.

5 years agoauth: Add enable-foreign-keys.mysql.sql to packages and Makefile.am
Matt Nordhoff [Sun, 2 Feb 2020 15:29:07 +0000 (15:29 +0000)] 
auth: Add enable-foreign-keys.mysql.sql to packages and Makefile.am

5 years agoauth: Add 4.3.0 schema files to Makefile.ams
Matt Nordhoff [Sun, 2 Feb 2020 15:20:47 +0000 (15:20 +0000)] 
auth: Add 4.3.0 schema files to Makefile.ams

5 years agoauth: do not update identical notified serials 8096/head
Kees Monshouwer [Thu, 4 Jul 2019 07:30:29 +0000 (09:30 +0200)] 
auth: do not update identical notified serials

5 years agoMerge pull request #8094 from mind04/pdns-diff-config
Peter van Dijk [Fri, 14 Feb 2020 14:18:22 +0000 (15:18 +0100)] 
Merge pull request #8094 from mind04/pdns-diff-config

auth: add full option to 'pdns_control show-config'

5 years agoMerge pull request #8823 from omoerbeek/rec-rpz-passthru
Otto Moerbeek [Fri, 14 Feb 2020 13:58:25 +0000 (14:58 +0100)] 
Merge pull request #8823 from omoerbeek/rec-rpz-passthru

Rec: do continue rpz processing if the current policy is passthru

5 years agoRefuse NSEC records with a bitmap length > 32 8826/head
Remi Gacogne [Fri, 14 Feb 2020 13:40:33 +0000 (14:40 +0100)] 
Refuse NSEC records with a bitmap length > 32

5 years agoMerge pull request #8799 from Habbie/odbc-threading
Peter van Dijk [Fri, 14 Feb 2020 12:53:17 +0000 (13:53 +0100)] 
Merge pull request #8799 from Habbie/odbc-threading

auth CI: enable ODBC thread locking

5 years agoMerge pull request #8815 from pieterlexis/yahttp-ipv6-address
Peter van Dijk [Fri, 14 Feb 2020 12:47:30 +0000 (13:47 +0100)] 
Merge pull request #8815 from pieterlexis/yahttp-ipv6-address

YaHTTP: Support bracketed IPv6 addresses

5 years agoMerge pull request #8779 from Habbie/empty-ixfr-soa-rrsig
Peter van Dijk [Fri, 14 Feb 2020 12:46:54 +0000 (13:46 +0100)] 
Merge pull request #8779 from Habbie/empty-ixfr-soa-rrsig

IXFR: only sign SOA in empty response for +DO queries

5 years agoRebased to handle NetmaskTree changes 8823/head
Otto Moerbeek [Fri, 14 Feb 2020 12:46:21 +0000 (13:46 +0100)] 
Rebased to handle NetmaskTree changes

5 years agoFix compilation issue on older compilers
Otto Moerbeek [Fri, 14 Feb 2020 10:48:15 +0000 (11:48 +0100)] 
Fix compilation issue on older compilers

5 years agoFormatting
Otto Moerbeek [Fri, 14 Feb 2020 09:55:11 +0000 (10:55 +0100)] 
Formatting

5 years agoAvoid copying policies around by passing a Policy& that gets modified
Otto Moerbeek [Fri, 14 Feb 2020 09:22:12 +0000 (10:22 +0100)] 
Avoid copying policies around by passing a Policy& that gets modified
if a match is found.

5 years agorec: Lookup RPZ Client IP rules before qname ones
Remi Gacogne [Thu, 13 Feb 2020 14:24:42 +0000 (15:24 +0100)] 
rec: Lookup RPZ Client IP rules before qname ones

5 years agorec: Add more RPZ regression tests
Remi Gacogne [Thu, 13 Feb 2020 14:23:57 +0000 (15:23 +0100)] 
rec: Add more RPZ regression tests

5 years agoTest clientIP before name, fix one more cutoff condition.
Otto Moerbeek [Wed, 12 Feb 2020 16:04:39 +0000 (17:04 +0100)] 
Test clientIP before name, fix one more cutoff condition.

5 years agorec: Add unit tests for the RPZ policy priorities and ordering
Remi Gacogne [Wed, 12 Feb 2020 15:53:47 +0000 (16:53 +0100)] 
rec: Add unit tests for the RPZ policy priorities and ordering

5 years agoSet the d_priority field in the policy objects of a zone.
Otto Moerbeek [Wed, 12 Feb 2020 15:49:58 +0000 (16:49 +0100)] 
Set the d_priority field in the policy objects of a zone.

Comments from racacogne:
Better name for currentPriority, more elegant loops with right cutoff.

5 years agorec: Add regression tests for the ordering of RPZ policies
Remi Gacogne [Wed, 12 Feb 2020 14:54:38 +0000 (15:54 +0100)] 
rec: Add regression tests for the ordering of RPZ policies

5 years agoContinue evaluation of RPZ rules after passthru, taking
Otto Moerbeek [Wed, 12 Feb 2020 14:35:12 +0000 (15:35 +0100)] 
Continue evaluation of RPZ rules after passthru, taking
into account RPZ priorities.

5 years agodnsdist: Fix issues reported by Charles-Henri during code review
Remi Gacogne [Fri, 14 Feb 2020 09:00:55 +0000 (10:00 +0100)] 
dnsdist: Fix issues reported by Charles-Henri during code review

5 years agoReplace include guard ifdef/define with pragma once 8631/head
Chris Hofstaedtler [Fri, 13 Dec 2019 10:00:31 +0000 (11:00 +0100)] 
Replace include guard ifdef/define with pragma once

5 years agotravis: enable ODBC thread locking 8799/head
Peter van Dijk [Mon, 10 Feb 2020 09:26:15 +0000 (10:26 +0100)] 
travis: enable ODBC thread locking

5 years agocircleci: enable ODBC thread locking
Peter van Dijk [Mon, 10 Feb 2020 09:26:09 +0000 (10:26 +0100)] 
circleci: enable ODBC thread locking

5 years agoMerge pull request #8614 from zeha/api-rm-unimplemented-check
Peter van Dijk [Wed, 12 Feb 2020 21:00:28 +0000 (22:00 +0100)] 
Merge pull request #8614 from zeha/api-rm-unimplemented-check

Remove not implemented zone check API from spec

5 years agoMerge pull request #8766 from zeha/chrish
Peter van Dijk [Wed, 12 Feb 2020 20:16:30 +0000 (21:16 +0100)] 
Merge pull request #8766 from zeha/chrish

Update my name in old changelogs

5 years agoMerge pull request #8793 from rgacogne/auth-reserve-caches
Peter van Dijk [Wed, 12 Feb 2020 20:06:24 +0000 (21:06 +0100)] 
Merge pull request #8793 from rgacogne/auth-reserve-caches

auth: Prepare the caches' buckets in advance

5 years agodocs security-policy: fix typo in my email address
Peter van Dijk [Wed, 12 Feb 2020 19:03:43 +0000 (20:03 +0100)] 
docs security-policy: fix typo in my email address

5 years agoYaHTTP: Send correct Host header for IPv6 address 8815/head
Pieter Lexis [Wed, 12 Feb 2020 14:29:01 +0000 (15:29 +0100)] 
YaHTTP: Send correct Host header for IPv6 address

5 years agoYaHTTP: Parse addresses with IPv6 literals
Pieter Lexis [Wed, 12 Feb 2020 14:27:18 +0000 (15:27 +0100)] 
YaHTTP: Parse addresses with IPv6 literals

A URL like http://[::1]:81 are parsed correctly now.

5 years agoMerge pull request #8760 from rgacogne/ddist-doh-exact-match
Remi Gacogne [Wed, 12 Feb 2020 09:09:24 +0000 (10:09 +0100)] 
Merge pull request #8760 from rgacogne/ddist-doh-exact-match

dnsdist: Don't accept sub-paths of configured DoH URLs

5 years agoUpdate pdns/dnsdistdist/docs/upgrade_guide.rst 8760/head
Remi Gacogne [Wed, 12 Feb 2020 09:09:04 +0000 (10:09 +0100)] 
Update pdns/dnsdistdist/docs/upgrade_guide.rst

Co-Authored-By: Otto Moerbeek <otto.moerbeek@open-xchange.com>
5 years agoMerge pull request #8355 from stephanbosch/netmask-tree
Remi Gacogne [Wed, 12 Feb 2020 08:43:49 +0000 (09:43 +0100)] 
Merge pull request #8355 from stephanbosch/netmask-tree

Rework NetmaskTree for better CPU and memory efficiency.

5 years agoiputils.hh: NetmaskTree: Make the node_type key value const. 8355/head
Stephan Bosch [Wed, 9 Oct 2019 00:06:33 +0000 (02:06 +0200)] 
iputils.hh: NetmaskTree: Make the node_type key value const.

This prevents changing the key used by the tree, which would otherwise provide
an opportunity to corrupt the tree.

5 years agoiputils.hh: NetmaskTree: Make the iterator reference a normal reference rather than...
Stephan Bosch [Mon, 30 Sep 2019 13:10:42 +0000 (15:10 +0200)] 
iputils.hh: NetmaskTree: Make the iterator reference a normal reference rather than a pointer.

This is possible now that the iterator type is no longer dictated by the
internal std::set. This changes the NetmaskTree::iterator API, but it makes it
more standard, less cumbersome, and less confusing.

5 years agoiputils.hh: NetmaskTree: Make TreeNode::node a normal field rather than a pointer.
Stephan Bosch [Mon, 30 Sep 2019 12:33:43 +0000 (14:33 +0200)] 
iputils.hh: NetmaskTree: Make TreeNode::node a normal field rather than a pointer.

It no longer needs to be allocated separately.

5 years agoiputils.hh: NetmaskTree: Drop the internal std::set.
Stephan Bosch [Mon, 30 Sep 2019 08:30:25 +0000 (10:30 +0200)] 
iputils.hh: NetmaskTree: Drop the internal std::set.

It is now superfluous.

5 years agoMerge pull request #8777 from omoerbeek/rec-wip-qname-vs-ds
Otto Moerbeek [Tue, 11 Feb 2020 16:08:28 +0000 (17:08 +0100)] 
Merge pull request #8777 from omoerbeek/rec-wip-qname-vs-ds

rec: QNAME minimization sometimes uses 1 label too many

5 years agodnsdist: Document that we no longer start as root by default
Remi Gacogne [Tue, 11 Feb 2020 15:40:31 +0000 (16:40 +0100)] 
dnsdist: Document that we no longer start as root by default

5 years agodnsdist: Document that DoH paths are now exact matches.
Remi Gacogne [Tue, 11 Feb 2020 15:40:11 +0000 (16:40 +0100)] 
dnsdist: Document that DoH paths are now exact matches.

5 years agoTypos 8777/head
Otto Moerbeek [Tue, 11 Feb 2020 14:58:35 +0000 (15:58 +0100)] 
Typos

5 years agobuilder: also touch /var/lib/rpm/* before build-specs
Peter van Dijk [Tue, 11 Feb 2020 12:22:44 +0000 (13:22 +0100)] 
builder: also touch /var/lib/rpm/* before build-specs

5 years agoMerge pull request #8778 from Habbie/recursor-rpz-refresh
Otto Moerbeek [Tue, 11 Feb 2020 11:33:09 +0000 (12:33 +0100)] 
Merge pull request #8778 from Habbie/recursor-rpz-refresh

rec RPZ dumpFile/seedFile: store/get SOA refresh on dump/load

5 years agoWarn at refresh=0 8778/head
Otto Moerbeek [Tue, 11 Feb 2020 11:30:29 +0000 (12:30 +0100)] 
Warn at refresh=0

5 years agodnsdist: Add LuaRule(), the non-FFI equivalent of LuaFFIRule()
Remi Gacogne [Wed, 29 Jan 2020 16:59:02 +0000 (17:59 +0100)] 
dnsdist: Add LuaRule(), the non-FFI equivalent of LuaFFIRule()

5 years agodnsdist: Add Lua bindings and documentation for the Lua FFI policies
Remi Gacogne [Thu, 23 Jan 2020 13:20:33 +0000 (14:20 +0100)] 
dnsdist: Add Lua bindings and documentation for the Lua FFI policies

5 years agodnsdist: Speed up the consistent hashing policies with large weights
Remi Gacogne [Wed, 22 Jan 2020 17:59:40 +0000 (18:59 +0100)] 
dnsdist: Speed up the consistent hashing policies with large weights

Using a sorted vector provides a much faster lookup time than a
std::set when the number of points on the circle (weight of the
backend) is huge.
A boost::flat_set is almost as fast as a sorted vector but the
insertion time is quite bad.

5 years agodnsdist: Clean up FFI types
Remi Gacogne [Mon, 6 Jan 2020 15:59:24 +0000 (16:59 +0100)] 
dnsdist: Clean up FFI types

5 years agodnsdist: Add direct Lua FFI interface for masking the remote addr
Remi Gacogne [Fri, 3 Jan 2020 17:06:54 +0000 (18:06 +0100)] 
dnsdist: Add direct Lua FFI interface for masking the remote addr

5 years agodnsdist: Skip the creation of temp objects in KVS lookups from Lua
Remi Gacogne [Fri, 3 Jan 2020 17:05:57 +0000 (18:05 +0100)] 
dnsdist: Skip the creation of temp objects in KVS lookups from Lua

5 years agodnsdist: Speed-up of the leastOutstanding policy
Remi Gacogne [Fri, 3 Jan 2020 17:04:33 +0000 (18:04 +0100)] 
dnsdist: Speed-up of the leastOutstanding policy

5 years agodnsdist: Add Lua Netmask bindings
Remi Gacogne [Fri, 3 Jan 2020 17:03:31 +0000 (18:03 +0100)] 
dnsdist: Add Lua Netmask bindings

5 years agodnsdist: Implement fast-{c,w}hashed FFI policies
Remi Gacogne [Thu, 2 Jan 2020 16:09:44 +0000 (17:09 +0100)] 
dnsdist: Implement fast-{c,w}hashed FFI policies

5 years agodnsdist: Bench LB policies
Remi Gacogne [Thu, 26 Dec 2019 15:37:29 +0000 (16:37 +0100)] 
dnsdist: Bench LB policies

5 years agodnsdist: Add Lua bindings for DNSName::hash()
Remi Gacogne [Thu, 26 Dec 2019 15:37:13 +0000 (16:37 +0100)] 
dnsdist: Add Lua bindings for DNSName::hash()

5 years agodnsdist: Add unit tests for Lua LB policies as well
Remi Gacogne [Mon, 16 Dec 2019 17:57:31 +0000 (18:57 +0100)] 
dnsdist: Add unit tests for Lua LB policies as well

5 years agodnsdist: Add unit tests for the load-balancing policies
Remi Gacogne [Fri, 13 Dec 2019 09:34:06 +0000 (10:34 +0100)] 
dnsdist: Add unit tests for the load-balancing policies

5 years agodnsdist: Implement FFI LB policies
Remi Gacogne [Wed, 11 Dec 2019 17:12:32 +0000 (18:12 +0100)] 
dnsdist: Implement FFI LB policies

5 years agodnsdist: Allow wrapping the FFI interface for the existing DNSQuestion object
Remi Gacogne [Tue, 3 Dec 2019 16:10:09 +0000 (17:10 +0100)] 
dnsdist: Allow wrapping the FFI interface for the existing DNSQuestion object

5 years agodnsdist: Add more FFI regression test (DoH, EDNS options and tags)
Remi Gacogne [Thu, 7 Nov 2019 14:36:04 +0000 (15:36 +0100)] 
dnsdist: Add more FFI regression test (DoH, EDNS options and tags)

5 years agodnsdist: Add documentation and a regression test for FFI functions
Remi Gacogne [Tue, 5 Nov 2019 15:40:56 +0000 (16:40 +0100)] 
dnsdist: Add documentation and a regression test for FFI functions

5 years agodnsdist: Implement LuaFFIRule, LuaFFIAction and LuaFFIResponseAction
Remi Gacogne [Mon, 4 Nov 2019 17:47:06 +0000 (18:47 +0100)] 
dnsdist: Implement LuaFFIRule, LuaFFIAction and LuaFFIResponseAction

5 years agoMerge pull request #8807 from Habbie/docker-ovl-rpm
Peter van Dijk [Tue, 11 Feb 2020 10:33:32 +0000 (11:33 +0100)] 
Merge pull request #8807 from Habbie/docker-ovl-rpm

builder: touch /var/lib/rpm/* in every docker layer that uses rpmdb

5 years agobuilder: touch /var/lib/rpm/* in every docker layer that uses rpmdb 8807/head
Peter van Dijk [Tue, 11 Feb 2020 10:06:03 +0000 (11:06 +0100)] 
builder: touch /var/lib/rpm/* in every docker layer that uses rpmdb

references:
https://github.com/pombredanne/dnf-plugin-ovl
https://bugzilla.redhat.com/show_bug.cgi?id=1213602

5 years agoMerge pull request #8804 from rgacogne/ddist-install-config-file
Peter van Dijk [Tue, 11 Feb 2020 05:56:30 +0000 (06:56 +0100)] 
Merge pull request #8804 from rgacogne/ddist-install-config-file

dnsdist: Fix configuration file installation / chmod

5 years agoiputils.hh: NetmaskTree: Add iterator class and use it for begin() and end() methods.
Stephan Bosch [Mon, 30 Sep 2019 08:30:25 +0000 (10:30 +0200)] 
iputils.hh: NetmaskTree: Add iterator class and use it for begin() and end() methods.

5 years agoiputils.hh: NetmaskTree: Keep track of the left-most node in the tree.
Stephan Bosch [Mon, 30 Sep 2019 08:30:25 +0000 (10:30 +0200)] 
iputils.hh: NetmaskTree: Keep track of the left-most node in the tree.

Needed to provide a begin() iterator in constant time.

5 years agoiputils.hh: NetmaskTree: Copy the tree using tree traversal.
Stephan Bosch [Mon, 30 Sep 2019 08:30:25 +0000 (10:30 +0200)] 
iputils.hh: NetmaskTree: Copy the tree using tree traversal.

Before, it used the internal std::set.

5 years agoiputils.hh: NetmaskTree::TreeNode: Implement tree traversal methods.
Stephan Bosch [Mon, 30 Sep 2019 08:30:25 +0000 (10:30 +0200)] 
iputils.hh: NetmaskTree::TreeNode: Implement tree traversal methods.

5 years agoiputils.hh: NetmaskTree: Make tree cleanup mandatory.
Stephan Bosch [Mon, 30 Sep 2019 08:30:25 +0000 (10:30 +0200)] 
iputils.hh: NetmaskTree: Make tree cleanup mandatory.

Potentially leaving branches full of unassigned nodes unnecessarily complicates
tree algorithms. Disabling tree cleanup was not used anywhere, except for a unit
test. Note that, after this change, individual branch nodes can still be
unassigned, but not the whole branch. So, when e.g. the left sub-branch of a
node exists, algorithms can rely on the fact that there is at least one assigned
node in there.

5 years agoiputils.hh: NetmaskTree: Always normalize key netmasks.
Stephan Bosch [Wed, 9 Oct 2019 20:49:21 +0000 (22:49 +0200)] 
iputils.hh: NetmaskTree: Always normalize key netmasks.

This makes address bits below the network mask all zero, which is consistent
with the tree's behavior.

This change addresses one sensitivity to this behavioral change in the recursor
cache.

5 years agoiputils.hh: NetmaskTree: Reduce the number of tree nodes.
Stephan Bosch [Mon, 30 Sep 2019 08:30:25 +0000 (10:30 +0200)] 
iputils.hh: NetmaskTree: Reduce the number of tree nodes.

Before, it created a tree node for every network bit in the netmask. Now, it
only creates a tree node when necessary (only for values and branches).