coredns/core/dnsserver
Miek Gieben e42614edc5
reverse zones (#4538)
* core: fix v4 non-octet reverse zones

This fixes the reverse zones handling. Add expanstion of the reverse
notation to all octet boundary subnets and add those to the config - just as if
they were directly typed in the config.

This takes inspiration from #4501, but that (even with DCO!!) seems to
be just using https://github.com/apparentlymart/go-cidr/ so use that
instead - I think a minor function is still needed that one is copied
from #4501.

Also sort the zones we are listing on startup - caught in this PR
because of the expanded zones being not listed next to each other.

This also removes the need for FilterFunc from the config, so this is
now gone as well, making the whole thing slightly more efficient.

Add couple of reverse unit tests and a e2e test that queries for the
correct (and incorrect) reverse zones and checks the reply.

Closes: #4501
Fixes: #2779

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add more test cases

Add test from origin bug report: #2779

Signed-off-by: Miek Gieben <miek@miek.nl>

* Rebase and fix conflicts

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-11 09:50:18 +02:00
..
address.go Revert "Validate zone during normalization (#3165)" (#3167) 2019-08-21 11:01:45 -04:00
address_test.go Revert "Validate zone during normalization (#3165)" (#3167) 2019-08-21 11:01:45 -04:00
config.go reverse zones (#4538) 2021-05-11 09:50:18 +02:00
https.go doh: set http request in writer (#4445) 2021-02-17 20:45:04 +01:00
log_test.go Clean up tests logging (#1979) 2018-07-19 16:23:06 +01:00
onstartup.go reverse zones (#4538) 2021-05-11 09:50:18 +02:00
register.go reverse zones (#4538) 2021-05-11 09:50:18 +02:00
register_test.go presubmit: Check errorf as well (#1845) 2018-06-02 11:48:39 -07:00
reverse.go reverse zones (#4538) 2021-05-11 09:50:18 +02:00
reverse_test.go reverse zones (#4538) 2021-05-11 09:50:18 +02:00
server.go reverse zones (#4538) 2021-05-11 09:50:18 +02:00
server_grpc.go plugin/file: guard against cname loops (#4387) 2021-01-15 18:26:04 +00:00
server_https.go doh: set http request in writer (#4445) 2021-02-17 20:45:04 +01:00
server_https_test.go custom DoH request validation (#4329) 2020-12-15 14:26:07 +01:00
server_test.go Enable debug globally if enabled in any server config (#4007) 2020-08-24 09:12:00 +02:00
server_tls.go plugin/file: guard against cname loops (#4387) 2021-01-15 18:26:04 +00:00
zdirectives.go Added minimal-responses plugin (#4417) 2021-03-15 15:37:55 +01:00