]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Add support for range-based lookups into a Key-Value store
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 24 Jun 2021 16:07:00 +0000 (18:07 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 20 Jul 2021 09:32:20 +0000 (11:32 +0200)
commit162abc50c2d470580502bcb4129833879b513a7f
tree64b1fb601e443a889435df04f64612a35db32289
parent6682b9c7adedd2978e871c1b7bcfba47c573f842
dnsdist: Add support for range-based lookups into a Key-Value store

This feature allows doing a range-based lookup (mostly useful for IP addresses), assuming that:
- there is a key for the last element of the range (2001:0db8:ffff:ffff:ffff:ffff:ffff:ffff for 2001:db8::/32)
which contains the first element of the range (2001:0db8:0000:0000:0000:0000:0000:0000) followed by any data in the value
- AND there is no overlapping ranges in the database !!

This requires that the underlying store supports ordered keys, which is true for LMDB but not for CDB, for example.
pdns/dnsdist-console.cc
pdns/dnsdist-lua-actions.cc
pdns/dnsdist-lua-rules.cc
pdns/dnsdistdist/dnsdist-kvs.cc
pdns/dnsdistdist/dnsdist-kvs.hh
pdns/dnsdistdist/dnsdist-lua-bindings-kvs.cc
pdns/dnsdistdist/dnsdist-rules.hh
pdns/dnsdistdist/docs/reference/kvs.rst
pdns/dnsdistdist/docs/rules-actions.rst
pdns/dnsdistdist/test-dnsdistkvs_cc.cc
regression-tests.dnsdist/test_LMDB.py