aboutsummaryrefslogtreecommitdiff
path: root/plugin (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-07-09add configurable log level to errors plugin (#4718)Gravatar Ondřej Benkovský 5-24/+151
Automatically submitted.
2021-07-09do not log NOERROR in log plugin when response is not available (#4725)Gravatar Ondřej Benkovský 2-1/+50
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-07-09plugin/cache: Unset AD flag when DO is not set for cache miss (#4736)Gravatar Chris O'Haver 3-9/+19
* unset AD bit when client DO is 0 Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add flag check to existing tests Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-07-05auto go fmtGravatar coredns[bot] 1-1/+1
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-06-30fix to docs; add acl example (#4711)Gravatar Chris O'Haver 1-3/+23
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-06-29trace plugin can mark traces with error tag (#4720)Gravatar Ondřej Benkovský 2-1/+21
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-06-24Correct newdnsController's documented function signature (#4717)Gravatar mfleader 1-1/+1
Signed-off-by: mleader <mleader@redhat.com>
2021-06-14Add NS+hosts records to xfr response. Add coredns service to test data. (#4696)Gravatar Chris O'Haver 3-3/+49
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-06-11plugin/secondary: doc updates (#4686)Gravatar Miek Gieben 1-0/+4
Add retry behavior on startup and point to RFC 5936 Signed-off-by: Miek Gieben <miek@miek.nl>
2021-06-10fix cidr multi-zone check (#4682)Gravatar Chris O'Haver 1-2/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-06-10plugin/secondary: Retry initial transfer until successful (#4663)Gravatar Chris O'Haver 1-1/+20
* retry initial transfer Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix import grouping Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add test; use backoff timeout Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix import order Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * manual backoff Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-06-08plugin/log: fix closing of codeblock (#4680)Gravatar Miek Gieben 1-1/+1
This fixes the rendering of this README as html. The codeblock was closed with 4 ~, should be 3. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-06-07Fix Route53 plugin cannot retrieve ECS Task Role (#4669)Gravatar Licht Takeuchi 1-5/+2
Signed-off-by: Licht Takeuchi <licht-t@outlook.jp>
2021-06-07auto go fmtGravatar coredns[bot] 1-1/+1
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-06-05Fix plugin file reload comment (#4665)Gravatar Sven Nebel 2-2/+2
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
2021-06-04Fix IPv6 case for CIDR format reverse zones (#4652)Gravatar Chris O'Haver 4-9/+67
* fix ipv6 case for cidr.Class Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add check and test case for invalid ipv6 cidr Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * net package is bad at detecting ipv6/ipv4 Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * rename Class -> Split Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-27Reduce the cardinality of health endpoint metrics (#4650)Gravatar Ben Kochie 3-4/+17
The health endpoint histogram has a large amount of cardinality for a simple endpoint. Introduce a new "Slim" set of buckets for `/health` to reduce the metrics load on large deployments. Especially those that have per-node DNS caching services. Add a metric to count internal health check failures rather than use the timeout value as side effect monitor of the check error. This avoids incorrectly recording the timeout value if there is an error that is not a timeout (ex. refused) Signed-off-by: SuperQ <superq@gmail.com>
2021-05-27plugin/kubernetes: consistently choose EndpointSlices or Endpoints for ↵Gravatar uesyn 1-13/+23
unstable API (#4647) * confirm endpointslices is served or not Signed-off-by: uesyn <suemura@zlab.co.jp> * Apply suggestions Signed-off-by: uesyn <suemura@zlab.co.jp>
2021-05-27deprecate Normalize and MustNormalize (#4648)Gravatar Chris O'Haver 6-11/+61
* deprecate normalize and mustnormalize Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add runtime warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * elaborate runtime warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * include caller info Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-20Revert "plugin/file: Fix in wrong answers returned when wildcard and ↵Gravatar Miek Gieben 3-110/+6
concrete records exist (#4599)" (#4633) reverting as I don't want to release 1.8.4 with this enabled. This reverts commit fbf3f07f469a99fcbb5985a41c260a3fad26f908.
2021-05-20plugin/forward: Document and warn for unsupported FROM CIDR notations (#4639)Gravatar Chris O'Haver 3-2/+9
* trap unsupported FROM cidr notations Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * make is a warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-19Fix obsure crash in Corefile parsing (#4637)Gravatar Miek Gieben 1-1/+5
This was found by fuzzing. We need to make this a fully qualified domain name to catch all errors in dnsserver/register.go and not later when plugin.Normalize() is called again on these strings, with the prime difference being that the domain name is fully qualified. This was found by fuzzing where "ȶ" is deemed OK, but "ȶ." is not (might be a bug in miekg/dns actually). But here we were checking ȶ, which is OK, and later we barf in ȶ. leading to "index out of range". Added a tests and check manually if it would crash with the current code (yes), and fail with an error in this PR (yes). Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-17plugin/file: Fix in wrong answers returned when wildcard and concrete ↵Gravatar Jason Du 3-6/+110
records exist (#4599) * plugin/file: Fix in wrong answers returned when wildcard and concrete records exist Signed-off-by: Jason Du <xdu@infoblox.com> * Remove superfluous change Signed-off-by: Jason Du <xdu@infoblox.com> * Re-implementation and new test case If the domain's terminal is neither the matching wildcard, nor a domian directly under the wildcard, return NXDOMAIN Signed-off-by: Jason Du <xdu@infoblox.com> * Fix empty non-terminal & add test case Signed-off-by: Jason Du <xdu@infoblox.com> * Cleanup Signed-off-by: Jason Du <xdu@infoblox.com> * Fix case on domain name with character before * and add more test cases Signed-off-by: Jason Du <xdu@infoblox.com> * Use different IPs for records in cornerCasesWildcard zone file Signed-off-by: Jason Du <xdu@infoblox.com>
2021-05-17reverse zone: fix Normalize (#4621)Gravatar Miek Gieben 27-310/+225
Make normalize return multiple "hosts" (= reverse zones) when a non-octet boundary cidr is given. Added pkg/cidr package that holds the cidr calculation routines; felt they didn't really fit dnsutil. This change means the IPNet return parameter isn't needed, the hosts are all correct. The tests that tests this is also removed: TestSplitHostPortReverse The fallout was that zoneAddr _also_ doesn't need the IPNet member, that in turn make it visible that zoneAddr in address.go duplicated a bunch of stuff from register.go; removed/refactored that too. Created a plugin.OriginsFromArgsOrServerBlock to help plugins do the right things, by consuming ZONE arguments; this now expands reverse zones correctly. This is mostly mechanical. Remove the reverse test in plugin/kubernetes which is a copy-paste from a core test (which has since been fixed). Remove MustNormalize as it has no plugin users. This change is not backwards compatible to plugins that have a ZONE argument that they parse in the setup util. All in-tree plugins have been updated. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-17consider nil ready as ready (#4632)Gravatar Chris O'Haver 1-2/+11
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-14Fix etcd to use v3.5.0-alpha.0 (#4628)Gravatar Jason Du 2-3/+3
Signed-off-by: Jason Du <xdu@infoblox.com>
2021-05-14check for two days of remaining validity (#4606)Gravatar Keith Coleman 2-3/+3
Signed-off-by: Keith C <keith@fraudmarc.com>
2021-05-10copy unready exclusion to v1beta1 func (#4616)Gravatar Chris O'Haver 1-0/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-10plugin/kubernetes: Support both v1 and v1beta1 EndpointSlices (#4570)Gravatar Chris O'Haver 3-12/+106
* support v1 and v1beta1 endpointslice Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * update comments Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-06plugin/dnssec: interface type correction for `periodicClean` sig validity ↵Gravatar Keith Coleman 1-3/+4
check (#4608) Signed-off-by: Keith C <keith@fraudmarc.com>
2021-05-04plugin/kubernetes: fix SOA response for non-apex queries (#4592)Gravatar Chris O'Haver 3-2/+17
* fix SOA response for non-apex queries Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * handle mixed case Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * do full string compare Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-04collect endpoint node name from endopintslices (#4581)Gravatar Chris O'Haver 1-1/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-04Add error check to avoid panic (#4584)Gravatar wangchenglong01 1-1/+4
* Add error check to avoid panic Signed-off-by: Cookie Wang <luckymrwang@163.com> * Add error check to avoid panic Signed-off-by: Cookie Wang <luckymrwang@163.com> Co-authored-by: Cookie Wang <luckymrwang@163.com>
2021-05-04plugin/rewrite: streamline the ResponseRule handling. (#4473)Gravatar Uwe Krueger 13-514/+882
* plugin/rewrite: streamline the ResponseRule handling. The functionality of a response rule is now completely encapsulated behind a `ResponseRule` interface. This significantly simplifies the complete processing flow, it enables more flexible response handling and it is possible to eliminate lots of state flags, ifs and switches. Based on the new flexibility the pull request also enables to support a response name rewrite for all name rewrite types. To be compatible, an explicit `answer auto` option is added to support a best effort response rewrite (name and value). Additionally now all name rewrite rules support additional name and value reponse rewrite options. Using this feature it is also possible now to rewrite a complete sub domain hierarchy to a single domain name combined with a correct rewrite (#2389). Signed-off-by: Uwe Krueger <uwe.krueger@sap.com> * revert policy Signed-off-by: Uwe Krueger <uwe.krueger@sap.com> Co-authored-by: Miek Gieben <miek@miek.nl>
2021-05-03plugin/etcd: Fix inconsistent names of glue records with TargetStrip (#4595)Gravatar ntoofu 2-1/+18
* etcd plugin: Add testcases for `TargetStrip` feature Signed-off-by: ntoofu <ntoofu@users.noreply.github.com> * etcd plugin: Fix inconsistent names in glue records Signed-off-by: ntoofu <ntoofu@users.noreply.github.com>
2021-04-27exclude unready endpoints from endpointslices (#4580)Gravatar Chris O'Haver 1-0/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-04-05plugin/dnssec: use entire RRset as key input (#4537)Gravatar Miek Gieben 5-15/+98
* plugin/dnssec: use entire RRset as key input This uses the entire rrset as input for the hash key; this is to detect differences in the RRset and generate the correct signature. As this would then lead to unbounded growth, we periodically (every 8h) prune the cache of old entries. In theory we could rely on the random eviction, but it seems nicer to do this in a maintannce loop so that we remove the unused ones. This required adding a Walk function to the plugin/pkg/cache. Signed-off-by: Miek Gieben <miek@miek.nl> * Update plugin/dnssec/cache.go Co-authored-by: Chris O'Haver <cohaver@infoblox.com> Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-04-05typos correct (#4560)Gravatar cuirunxing-hub 1-1/+1
Signed-off-by: cuirunxing-hub <cuirunxing@inspur.com>
2021-03-26plugin/kubernetes: do endpoint/slice check in retry loop (#4492)Gravatar Chris O'Haver 4-73/+140
* do endpoint/slice check in retry loop Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-03-25plugin/bind: exclude interface or ip address (#4543)Gravatar Mohammad Yosefpor 4-35/+123
* plugin/bind: exclude interface or ip address Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * fix README.md Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * Apply suggestions, Fix test Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * Apply suggestions, move errs to setup Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
2021-03-21Add cache eviction metrics to the cache plugin (#4411)Gravatar Frank Riley 4-5/+22
Signed-off-by: Frank Riley <fhriley@gmail.com>
2021-03-19metrics: remove RR type (#4534)Gravatar Miek Gieben 5-19/+13
To combat label cardinality explosions remove the type from metrics. This was most severe in the histogram for request duration, remove it there. It's also highlighted difference between grpc and forward code, where forward did use type and grpc didn't; getting rid of all that "fixes" that discrepancy Move monitor.go back into the vars directory and make it private again. Also name it slightly better Fixes: #4507 Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-19plugin/health: add logging for local health request (#4533)Gravatar Miek Gieben 2-4/+9
2021-03-18plugin/bind: tweak error messages (#4532)Gravatar Miek Gieben 1-2/+2
When the interface doesn't exist you get: plugin/bind: not a valid IP address: eth0 Fix the wording that this can also be interface name. Also %q the argument in the error mesg. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-18plugin/bind: Discard link-local addresses on binding by interface name (#4531)Gravatar Mohammad Yosefpor 2-2/+4
* Discard link-local addresses on binding Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * Update plugin/bind: README.md Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * Except for IPv6 link-local only Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
2021-03-18plugin/bind: Bind by interface name (#4522)Gravatar Mohammad Yosefpor 3-8/+43
* auto make -f Makefile.doc Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * Bind by interface name Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * README.md: Interface with multiple address Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * auto make -f Makefile.doc Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * auto make -f Makefile.doc Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * Elaborate more on the behaviour in README.md, revert man/*, fix tests Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * auto make -f Makefile.doc Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * --sign-off Revert man/* to fix DCO check Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> * auto make -f Makefile.doc * Revert man/* to fix DCO check Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com> Co-authored-by: coredns-auto-go-mod-tidy[bot] <coredns-auto-go-mod-tidy[bot]@users.noreply.github.com>
2021-03-16add metadata section to docs (#4525)Gravatar Chris O'Haver 1-0/+7
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-03-16add forward/upstream metadata (#4521)Gravatar Chris O'Haver 1-0/+5
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-03-16plugin/minimal: fix import path (#4523)Gravatar Miek Gieben 2-0/+2
presubmit failing, fix import path. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-15Revert "plugin/sign: track zone file's mtime (#4431)" (#4511)Gravatar Miek Gieben 3-73/+4
This reverts commit c4720b8ad238fc5e0603c7f96fdd5982024404a2.