aboutsummaryrefslogtreecommitdiff
path: root/core (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-12-08plugin/tls: respect the path specified by root plugin (#6138)Gravatar Marius Kimmina 1-1/+1
* plugin/tls: respect the path specified by root plugin Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com> * improve readme Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com> --------- Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com>
2023-07-31[RFC-9250]: Add QUIC server support (#6182)Gravatar João Henri 5-0/+440
Add DNS-over-QUIC server Signed-off-by: jaehnri <joao.henri.cr@gmail.com> Signed-off-by: João Henri <joao.henri.cr@gmail.com>
2023-06-02prevent panics when using DoHWriter (#6120)Gravatar Ondřej Benkovský 1-8/+43
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2023-04-25fix some comments (#6052)Gravatar cui fliter 1-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-02-15Close the body after reading the response body information (#5907)Gravatar Fish-pro 1-0/+1
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-01-23Move flags to coremain (#5865)Gravatar David Hadas 1-6/+0
2022-12-28plugin/timeouts - Allow ability to configure listening server timeouts (#5784)Gravatar Rich 7-14/+70
2022-10-28Fork TLSConfig for each encrypted connection (#5710)Gravatar sanyo0714 1-1/+3
* Fork TLSConfig for each encrypted connection Signed-off-by: sanyo <sanyo0714@163.com> Co-authored-by: sanyo <yeshengan.ysa@alibaba-inc.com>
2022-09-08plugin/view: Advanced routing interface and new 'view' plugin (#5538)Gravatar Chris O'Haver 11-56/+197
* introduce new interface "dnsserver.Viewer", that allows a plugin implementing it to decide if a query should be routed into its server block. * add new plugin "view", that uses the new interface to enable a user to define expression based conditions that must be met for a query to be routed to its server block. Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-07-10add golangci-lint linter (#5499)Gravatar Ondřej Benkovský 8-16/+0
2022-07-06Warn when domain names are not in RFC1035 preferred syntax (#5414)Gravatar Md Sahil 2-0/+57
Warn when domain names are not in RFC1035 preferred syntax Signed-off-by: Md Sahil <Mohdssahil1@gmail.com>
2022-07-04auto go fmtGravatar coredns[bot] 1-1/+1
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2022-06-27plugin/tsig: new plugin TSIG (#4957)Gravatar Chris O'Haver 5-2/+16
* expose tsig secrets via dnsserver.Config * add tsig plugin Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-06-23log DoH HTTP server error logs in CoreDNS format (#5457)Gravatar Ondřej Benkovský 1-0/+12
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-06-20plugin/trace: read trace context info from headers for DOH (#5439)Gravatar Ondřej Benkovský 1-0/+4
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-05-24recover from panic log including stacktrace to help finding the origin (#5392)Gravatar Radim Hatlapatka 4-1/+34
2022-03-14Unit tests: dnsserver/https (#5251)Gravatar nathannaveen 1-0/+90
- Added unit tests for dnsserver/https. Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
2022-02-17Update to use the latest protobuf package to build pb (#5193)Gravatar Yong Tang 1-0/+1
* Update to use the latest protobuf package to build pb The pb package was generated some time ago with old version of https://github.com/golang/protobuf which was deprecated and in favor of google.golang.org/protobuf (see deprecation notice in https://pkg.go.dev/github.com/golang/protobuf) This PR updates the generation of pb package with v1.27.1 of google.golang.org/protobuf. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Exclude pb from import test Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-02-17Add metric counting DNS-over-HTTPS responses (#5130)Gravatar Rudolf Schönecker 1-0/+9
Signed-off-by: Rudolf Schonecker <rudolf.schonecker@jamf.com>
2022-01-13Log panic cause for better debugging (#5091)v1.8.7Gravatar Ondřej Benkovský 1-1/+1
2021-11-23support plain HTTP for DoH (#4997)Gravatar Ondřej Benkovský 1-4/+4
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2021-11-12Revert "Initial implementation of ForwardCRD plugin (#4512)" (#4981)Gravatar Chris O'Haver 2-2/+0
This reverts commit 2e6953c7dbd1d6b359911e1ce92e2567df07ca8c.
2021-11-12Initial implementation of ForwardCRD plugin (#4512)Gravatar Christian Ang 2-0/+2
* Add forwardcrd plugin README.md Co-authored-by: Aidan Obley <aobley@vmware.com> Signed-off-by: Christian Ang <angc@vmware.com> * Create forwardcrd plugin - Place forwardcrd before forward plugin in plugin list. This will avoid forward from preventing the forwardcrd plugin from handling any queries in the case of having a default upstream forwarder in a server block (as is the case in the default kubernetes Corefile). Co-authored-by: Aidan Obley <aobley@vmware.com> Signed-off-by: Christian Ang <angc@vmware.com> * Add Forward CRD Signed-off-by: Christian Ang <angc@vmware.com> * Add NewWithConfig to forward plugin - allows external packages to instanciate forward plugins Co-authored-by: Aidan Obley <aobley@vmware.com> Signed-off-by: Christian Ang <angc@vmware.com> * ForwardCRD plugin handles requests for Forward CRs - add a Kubernetes controller that can read Forward CRs - instances of the forward plugin are created based on Forward CRs from the Kubernetes controller - DNS requests are handled by calling matching Forward plugin instances based on zone name - Defaults to the kube-system namespace to align with Corefile RBAC Signed-off-by: Christian Ang <angc@vmware.com> Use klog v2 in forwardcrd plugin * Refactor forward setup to use NewWithConfig Co-authored-by: Christian Ang <angc@vmware.com> Signed-off-by: Edwin Xie <exie@vmware.com> * Use ParseInt instead of Atoi - to ensure that the bitsize is 32 for later casting to uint32 Signed-off-by: Christian Ang <angc@vmware.com> * Add @christianang to CODEOWNERS for forwardcrd Signed-off-by: Christian Ang <angc@vmware.com> Co-authored-by: Edwin Xie <exie@vmware.com>
2021-11-12Metrics: expand coredns_dns_responses_total with plugin label (#4914)Gravatar Miek Gieben 1-1/+1
* Metrics: expand coredns_dns_responses_total with plugin label This adds (somewhat hacky?) code to add a plugin label to the coredns_dns_responses_total metric. It's completely obvlious to the plugin as we just check who called the *recorder.WriteMsg method. We use runtime.Caller( 1 2 3) to get multiple levels of callers, this should be deep enough, but it depends on the dns.ResponseWriter wrapping that's occuring. README.md of metrics updates and test added in test/metrics_test.go to check for the label being set. I went through the plugin to see what metrics could be removed, but actually didn't find any, the plugin push out metrics that make sense. Due to the path fiddling to figure out the plugin name I doubt this works (out-of-the-box) for external plugins, but I haven't tested that. Signed-off-by: Miek Gieben <miek@miek.nl> * better comment Signed-off-by: Miek Gieben <miek@miek.nl> * Metrics: expand coredns_dns_responses_total with plugin label This adds (somewhat hacky?) code to add a plugin label to the coredns_dns_responses_total metric. It's completely obvlious to the plugin as we just check who called the *recorder.WriteMsg method. We use runtime.Caller( 1 2 3) to get multiple levels of callers, this should be deep enough, but it depends on the dns.ResponseWriter wrapping that's occuring. README.md of metrics updates and test added in test/metrics_test.go to check for the label being set. I went through the plugin to see what metrics could be removed, but actually didn't find any, the plugin push out metrics that make sense. Due to the path fiddling to figure out the plugin name I doubt this works (out-of-the-box) for external plugins, but I haven't tested that. Signed-off-by: Miek Gieben <miek@miek.nl> * Update core/dnsserver/server.go Co-authored-by: dilyevsky <ilyevsky@gmail.com> * Use [3]string Signed-off-by: Miek Gieben <miek@miek.nl> * imports Signed-off-by: Miek Gieben <miek@miek.nl> * remove dnstest changes Signed-off-by: Miek Gieben <miek@miek.nl> * revert Signed-off-by: Miek Gieben <miek@miek.nl> * Add some sleeps to make it less flaky Signed-off-by: Miek Gieben <miek@miek.nl> * Revert "Add some sleeps to make it less flaky" This reverts commit b5c6655196e3ad570555f086832ceb1f48f6f2d5. * Remove forward when not needed Signed-off-by: Miek Gieben <miek@miek.nl> * remove newline Signed-off-by: Miek Gieben <miek@miek.nl> Co-authored-by: dilyevsky <ilyevsky@gmail.com>
2021-10-08Enable HTTP/2 in grpc service (#4842)Gravatar Johnny Bergström 1-0/+5
Signed-off-by: Johnny Bergström <johnny@klaudify.se>
2021-07-15plugin/header: run go gen and small doc updates (#4754)Gravatar Miek Gieben 2-0/+2
* plugin/header: run go gen and small doc updates Run go gen to enable the new plugin, this should fix the CI failures. Small tweaks to the docs. Signed-off-by: Miek Gieben <miek@miek.nl> * another typo Signed-off-by: Miek Gieben <miek@miek.nl> * gofmt Signed-off-by: Miek Gieben <miek@miek.nl>
2021-07-14Create geoip plugin (#4688)Gravatar Sven Nebel 2-0/+2
* Create geoip plugin Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/README.md Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/README.md Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/README.md Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Move DBFILE bullet below example Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/README.md Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove plugin name test case Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove languages option Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update free database link Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove last language bits Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Use 127.0.0.1 as probing IP Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/geoip.go Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/geoip.go Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Use relative path for fixtures dir Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Set names with default string zero value Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove unused db types Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove non city databases in testdata Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove create databases main Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Fix metadata label format test case Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Fix import path block Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * go fmt after changes Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Tidy up go.mod and go.sum Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Add plugin to CODEOWNERS Signed-off-by: Sven Nebel <nebel.sven@gmail.com> Co-authored-by: Miek Gieben <miek@miek.nl>
2021-07-09Share plugins among zones in the same server block (#4593)Gravatar Chris O'Haver 2-0/+26
* share plugins among zones in the same server block Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * update caddy dep Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * simp code Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * copy ListenHosts and Debug from first config Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * copy tls configs from first config Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add test to validate debug setting is replicated to all configs in block Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * stop server Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-28Add -p for port flag (#4653)Gravatar Miek Gieben 1-0/+1
-p is the default flag in DNS software for setting the port, we use 'dns.port' because of preventing clashes with other caddy software users. This is no longer an issue, so we can do what we want here. Add -p to works like -dns.port. (this PR includes generated manpage, but that shouldn't matter too much) Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-19Fix obsure crash in Corefile parsing (#4637)Gravatar Miek Gieben 1-0/+11
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-17reverse zone: fix Normalize (#4621)Gravatar Miek Gieben 5-197/+31
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-11reverse zones (#4538)Gravatar Miek Gieben 6-41/+108
* 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-03-15Added minimal-responses plugin (#4417)Gravatar Soumya Ghosh Dastidar 2-0/+2
* Added minimal-responses plugin Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Removed unnecessary comments * Updated tests Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Reformated imports Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated package name Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Removed unnecessary comments Co-authored-by: Miek Gieben <miek@miek.nl> * Added changes Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * updated Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated comment for NextOrFailure Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated to test.Case for testing Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Formated imports using goimports Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> Co-authored-by: Miek Gieben <miek@miek.nl>
2021-02-17doh: set http request in writer (#4445)Gravatar Johnny Bergström 2-1/+12
Makes it possible to read the current http request while serving DNS Signed-off-by: Johnny Bergström <johnny@klaudify.se>
2021-01-15plugin/file: guard against cname loops (#4387)Gravatar Miek Gieben 4-2/+12
Automatically submitted.
2020-12-15custom DoH request validation (#4329)Gravatar Johnny Bergström 3-6/+90
* custom DoH request validation Signed-off-by: Johnny Bergström <johnny@klaudify.se> * add comment and test Signed-off-by: Johnny Bergström <johnny@klaudify.se> * NewServerHTTPS comment typo Signed-off-by: Johnny Bergström <johnny@klaudify.se>
2020-11-05add local plugin (#4262)Gravatar Miek Gieben 2-0/+2
* add local plugin See: #4260 Signed-off-by: Miek Gieben <miek@miek.nl> * stickler bot Signed-off-by: Miek Gieben <miek@miek.nl> * See Also Signed-off-by: Miek Gieben <miek@miek.nl>
2020-10-07core: fix crash with no plugins (#4184)Gravatar Miek Gieben 1-0/+4
* core: fix crash with no plugins A Corefile that defines a zone without plugins crashes coredns with the stack trace below. Change this to return a refused. ~~~ corefile example.org { whoami log cache debug } example.net { } ~~~ Asking for anyhing in example.net does this. Add test that tests this. ~~~ panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xa5e6a4] goroutine 55 [running]: github.com/coredns/coredns/core/dnsserver.(*Server).ServeDNS(0xc000438f60, 0x2059420, 0xc0005a4030, 0x206c0e0, 0xc000522140, 0xc0005ae000) /home/miek/src/github.com/coredns/coredns/core/dnsserver/server.go:247 +0x884 github.com/coredns/coredns/core/dnsserver.(*Server).ServePacket.func1(0x206dd00, 0xc00009e180, 0xc0005ae000) /home/miek/src/github.com/coredns/coredns/core/dnsserver/server.go:126 +0xaf github.com/miekg/dns.HandlerFunc.ServeDNS(0xc000529270, 0x206dd00, 0xc00009e180, 0xc0005ae000) /home/miek/go/pkg/mod/github.com/miekg/dns@v1.1.31/server.go:37 +0x44 github.com/miekg/dns.(*Server).serveDNS(0xc000286c60, 0xc000282400, 0x34, 0x200, 0xc00009e180) /home/miek/go/pkg/mod/github.com/miekg/dns@v1.1.31/server.go:609 +0x2f7 github.com/miekg/dns.(*Server).serveUDPPacket(0xc000286c60, 0xc0003b03b4, 0xc000282400, 0x34, 0x200, 0xc00000e320, 0xc000522080) /home/miek/go/pkg/mod/github.com/miekg/dns@v1.1.31/server.go:549 +0xb2 created by github.com/miekg/dns.(*Server).serveUDP /home/miek/go/pkg/mod/github.com/miekg/dns@v1.1.31/server.go:479 +0x292 ~~~ Also fix single typo in chaos_test.go Signed-off-by: Miek Gieben <miek@miek.nl> * Fix naming Signed-off-by: Miek Gieben <miek@miek.nl>
2020-10-06fix alpn for http/2 upgrade when using DoH (#4182)Gravatar Johnny Bergström 1-0/+3
Signed-off-by: Johnny Bergström <johnny@klaudify.se>
2020-09-30doh support: make no TLS config fatal (#4162)Gravatar Miek Gieben 1-0/+3
without TLS you can't have a functioning DoH server as no client will be able to talk to it. Make this a fatal failure. Add some extra docs on how to start a DoH capable server. Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-24For caddy v1 in our org (#4018)Gravatar Miek Gieben 7-11/+8
* For caddy v1 in our org This RP changes all imports for caddyserver/caddy to coredns/caddy. This is the v1 code of caddy. For the coredns/caddy repo the following changes have been made: * anything not needed by us is deleted * all `telemetry` stuff is deleted * all its import paths are also changed to point to coredns/caddy * the v1 branch has been moved to the master branch * a v1.1.0 tag has been added to signal the latest release Signed-off-by: Miek Gieben <miek@miek.nl> * Fix imports Signed-off-by: Miek Gieben <miek@miek.nl> * Group coredns/caddy with out plugins Signed-off-by: Miek Gieben <miek@miek.nl> * remove this file Signed-off-by: Miek Gieben <miek@miek.nl> * Relax import ordering github.com/coredns is now also a coredns dep, this makes github.com/coredns/caddy fit more natural in the list. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix final import Signed-off-by: Miek Gieben <miek@miek.nl>
2020-09-06Fix trailing whitespace (#4103)Gravatar Yong Tang 1-1/+1
The latest commit (e233f59) on master branch introduced a trailing whitespace and is causing Travis CI build to fail: https://travis-ci.org/github/coredns/coredns/builds/722988413 This PR fixes the failing test. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-09-01Fix some typos in comments. (#4100)Gravatar Hu Shuai 6-6/+6
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-08-24Enable debug globally if enabled in any server config (#4007)Gravatar Olivier Lemasle 2-4/+33
* Enable debug globally if enabled in any server config It was currently enabled only if the plugin debug was enabled in the last server config of the Corefile. Signed-off-by: Olivier Lemasle <o.lemasle@gmail.com> * Add test and update debug's README Signed-off-by: Olivier Lemasle <o.lemasle@gmail.com>
2020-07-02Add timeouts for http server (#3920)Gravatar milgradesec 1-1/+6
Signed-off-by: milgradesec <milgradesec@gmail.com>
2020-03-30remove federation (#3794)Gravatar Zou Nengren 2-2/+0
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-26Add dns64 plugin (#3534)Gravatar Ben Kochie 2-0/+2
* Add dns64 plugin Add external plugin to core in-tree. * Pull code from upstream: https://github.com/serverwentdown/dns64 * Update docs. Signed-off-by: Ben Kochie <superq@gmail.com> * Make dns64 consistent. Signed-off-by: Ben Kochie <superq@gmail.com> * Cleanup README Signed-off-by: Ben Kochie <superq@gmail.com> * Cleanup minor issues. Signed-off-by: Ben Kochie <superq@gmail.com> * Remove proxy method. Signed-off-by: Ben Kochie <superq@gmail.com> * dns64: big cleanup * Make the code a bit more idiomatic * Add tests * use proper Upstream API Signed-off-by: Casey Callendrello <c1@caseyc.net> Signed-off-by: Ben Kochie <superq@gmail.com> * A little more clenaup * Fix some docs. * Use the correct plugin register method. * Cleanup some review items. Signed-off-by: Ben Kochie <superq@gmail.com> * Add metrics counter for DNS64 translations Add a basic counter of how many DNS64 translations have been completed. Signed-off-by: Ben Kochie <superq@gmail.com> * Add DNSSEC bug link Signed-off-by: Ben Kochie <superq@gmail.com> * Test cleanup Signed-off-by: Ben Kochie <superq@gmail.com> * dns64: more test cleanup Signed-off-by: Casey Callendrello <c1@caseyc.net> Co-authored-by: Casey Callendrello <c1@caseyc.net>
2020-03-06validate object implements the corresponding interface (#3724)Gravatar Zou Nengren 5-0/+20
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
2019-11-16create pkg/reuseport (#3455)Gravatar Miek Gieben 6-49/+9
* create pkg/reuseport Move the core server listening functions to a new package so plugins can use them. Also make *all* servers use the functions here; as only the udp/tcp listeners where using SO_REUSEPORT (if available). This is the only actual change in this PR; in it's core it's just a move of 2 files. This can also be used to cleanup the dance we're doing now for re-acquiring the sockets in e.g. the metrics plugins and the ready plugin. Signed-off-by: Miek Gieben <miek@miek.nl> * Also push a small doc update Signed-off-by: Miek Gieben <miek@miek.nl>
2019-11-10Add bufsize plugin for preparing the DNS Flag Day and avoiding IP ↵Gravatar Kohei Yoshida 2-0/+2
fragmentation (#3401) * add bufsize plugin Signed-off-by: ykhr53 <yukihira.lab@gmail.com> * add docstring and comment Signed-off-by: ykhr53 <yukihira.lab@gmail.com> * delete stdout messages when get an error Signed-off-by: ykhr53 <yukihira.lab@gmail.com> * change to context.Background from TODO Signed-off-by: ykhr53 <yukihira.lab@gmail.com> * define default bufsize as defaultBufSize constant Signed-off-by: ykhr53 <yukihira.lab@gmail.com> * fix some comments Signed-off-by: ykhr53 <yukihira.lab@gmail.com> * function name change: parse Signed-off-by: ykhr53 <yukihira.lab@gmail.com> * function name change: parse Signed-off-by: ykhr53 <yukihira.lab@gmail.com>