Commit graph

288 commits

Author SHA1 Message Date
Viktor
6c39f4bae7
multisocket plugin (#6882)
* multisocket plugin improves performance in multiprocessor systems

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* - refactoring
- update doc

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* remove port from reuseport plugin README

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* rename reuseport plugin to numsockets plugin

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* Add Recommendations to numsockets README

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* added numsockets test; made NUM_SOCKETS mandatory in doc

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* restart and whoami tests for numsockets plugin

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* default value for numsockets

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* caddy up

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* add numsockets to plugin.cfg

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* - rename numsockets plugin to multisocket
- default as GOMAXPROCS
- update README

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

* resolve conflicts

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>

---------

Signed-off-by: Viktor Rodionov <33463837+Shmillerov@users.noreply.github.com>
2024-11-13 09:40:25 -08:00
Johnny Bergström
909ce9386d
core: set cache-control max-age as integer, not float (#6764)
As specified in rfc2616, the max-age is an integer.
Setting a float might make the header get ignored in some cases.
2024-10-24 15:20:19 -04:00
YASH JAIN
2d1ce165a5
Issue-6671: Fixed the order of plugins. (#6729)
* Issue-6671: Fixed the order of plugins.

Signed-off-by: osho-20 <yashjainiiita@gmail.com>

* Issue-6671: corrected test cases.

Signed-off-by: osho-20 <yashjainiiita@gmail.com>

* Issue-6671: fixed CoreDNSServerPorts

Signed-off-by: osho-20 <yashjainiiita@gmail.com>

* Issue-6671: removed unnecessary change.

Signed-off-by: osho-20 <yashjainiiita@gmail.com>

* Issue-6671: added extra check for error.

Signed-off-by: osho-20 <yashjainiiita@gmail.com>

---------

Signed-off-by: osho-20 <yashjainiiita@gmail.com>
2024-10-24 15:18:56 -04:00
Marius Kimmina
92ec849acb
plugin/tls: respect the path specified by root plugin (#6138)
* 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-12-08 10:50:30 -05:00
João Henri
cc7a364633
[RFC-9250]: Add QUIC server support (#6182)
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-07-31 15:34:31 -04:00
Ondřej Benkovský
c74c212bdf
prevent panics when using DoHWriter (#6120)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2023-06-02 09:33:34 -04:00
cui fliter
ee3999303d
fix some comments (#6052)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-25 11:25:07 -04:00
Fish-pro
156da74ad3
Close the body after reading the response body information (#5907)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-15 12:41:51 -05:00
David Hadas
280ef6f405
Move flags to coremain (#5865) 2023-01-23 04:27:18 -08:00
Rich
e7ad486b50
plugin/timeouts - Allow ability to configure listening server timeouts (#5784) 2022-12-28 12:14:16 +01:00
sanyo0714
9497644505
Fork TLSConfig for each encrypted connection (#5710)
* Fork TLSConfig for each encrypted connection

Signed-off-by: sanyo <sanyo0714@163.com>
Co-authored-by: sanyo <yeshengan.ysa@alibaba-inc.com>
2022-10-28 12:55:41 -04:00
Chris O'Haver
b56b080a7c
plugin/view: Advanced routing interface and new 'view' plugin (#5538)
* 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-09-08 14:56:27 -04:00
Ondřej Benkovský
c2dbb7141a
add golangci-lint linter (#5499) 2022-07-10 11:06:33 -07:00
Md Sahil
a6078ddba3
Warn when domain names are not in RFC1035 preferred syntax (#5414)
Warn when domain names are not in RFC1035 preferred syntax 

Signed-off-by: Md Sahil <Mohdssahil1@gmail.com>
2022-07-06 13:50:45 -04:00
coredns[bot]
f8ef1dc652 auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2022-07-04 10:29:59 +00:00
Chris O'Haver
68e141eff2
plugin/tsig: new plugin TSIG (#4957)
* expose tsig secrets via dnsserver.Config
* add tsig plugin

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-06-27 15:48:34 -04:00
Ondřej Benkovský
d7f8202dc3
log DoH HTTP server error logs in CoreDNS format (#5457)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-06-23 15:46:42 -04:00
Ondřej Benkovský
af4d84d915
plugin/trace: read trace context info from headers for DOH (#5439)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2022-06-20 07:08:53 -07:00
Radim Hatlapatka
91bcbc2e3a
recover from panic log including stacktrace to help finding the origin (#5392) 2022-05-24 14:36:36 +02:00
nathannaveen
188077d7fc
Unit tests: dnsserver/https (#5251)
- Added unit tests for dnsserver/https.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
2022-03-14 07:55:25 -07:00
Yong Tang
2f020dcb30
Update to use the latest protobuf package to build pb (#5193)
* 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-17 23:11:45 -08:00
Rudolf Schönecker
c121aaab34
Add metric counting DNS-over-HTTPS responses (#5130)
Signed-off-by: Rudolf Schonecker <rudolf.schonecker@jamf.com>
2022-02-17 08:37:40 -05:00
Ondřej Benkovský
a9adfd56ad
Log panic cause for better debugging (#5091) 2022-01-13 12:41:32 -08:00
Ondřej Benkovský
b8439789f4
support plain HTTP for DoH (#4997)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2021-11-23 14:03:26 +01:00
Chris O'Haver
3288b111b2
Revert "Initial implementation of ForwardCRD plugin (#4512)" (#4981)
This reverts commit 2e6953c7db.
2021-11-12 13:19:16 -05:00
Christian Ang
2e6953c7db
Initial implementation of ForwardCRD plugin (#4512)
* 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-12 11:22:34 -05:00
Miek Gieben
6953ab2b4f
Metrics: expand coredns_dns_responses_total with plugin label (#4914)
* 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 b5c6655196.

* 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-11-12 16:07:05 +00:00
Johnny Bergström
9af2dc11f9
Enable HTTP/2 in grpc service (#4842)
Signed-off-by: Johnny Bergström <johnny@klaudify.se>
2021-10-08 15:56:33 +02:00
Miek Gieben
50d888f3d7
plugin/header: run go gen and small doc updates (#4754)
* 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-15 10:10:16 +02:00
Sven Nebel
21f1207afe
Create geoip plugin (#4688)
* 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-14 09:25:30 +02:00
Chris O'Haver
bdaa2a5527
Share plugins among zones in the same server block (#4593)
* 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-07-09 17:12:06 +02:00
Miek Gieben
bcbe624eb4
Add -p for port flag (#4653)
-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-28 07:08:13 -07:00
Miek Gieben
5d80a6e21e
Fix obsure crash in Corefile parsing (#4637)
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-19 10:38:37 -07:00
Miek Gieben
5f41d8eb1f
reverse zone: fix Normalize (#4621)
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-17 13:19:54 -07:00
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
Soumya Ghosh Dastidar
7651e6c4de
Added minimal-responses plugin (#4417)
* 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-03-15 15:37:55 +01:00
Johnny Bergström
fe2b5f630d
doh: set http request in writer (#4445)
Makes it possible to read the current http request while serving DNS

Signed-off-by: Johnny Bergström <johnny@klaudify.se>
2021-02-17 20:45:04 +01:00
Miek Gieben
342eae9b4b
plugin/file: guard against cname loops (#4387)
Automatically submitted.
2021-01-15 18:26:04 +00:00
Johnny Bergström
be955daa37
custom DoH request validation (#4329)
* 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-12-15 14:26:07 +01:00
Miek Gieben
7bbcf6920f
add local plugin (#4262)
* 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-11-05 15:02:07 +01:00
Miek Gieben
04e532b257
core: fix crash with no plugins (#4184)
* 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-07 15:58:14 +02:00
Johnny Bergström
383cc2809b
fix alpn for http/2 upgrade when using DoH (#4182)
Signed-off-by: Johnny Bergström <johnny@klaudify.se>
2020-10-06 15:38:12 +02:00
Miek Gieben
5235b35e3f
doh support: make no TLS config fatal (#4162)
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-30 17:17:24 +02:00
Miek Gieben
b003d06003
For caddy v1 in our org (#4018)
* 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-24 18:14:41 +02:00
Yong Tang
7b78170041
Fix trailing whitespace (#4103)
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-06 20:57:56 -04:00
Hu Shuai
e233f59ee8
Fix some typos in comments. (#4100)
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-09-01 09:10:45 +02:00
Olivier Lemasle
f36715e889
Enable debug globally if enabled in any server config (#4007)
* 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-08-24 09:12:00 +02:00
milgradesec
418c24c062
Add timeouts for http server (#3920)
Signed-off-by: milgradesec <milgradesec@gmail.com>
2020-07-02 16:07:29 +02:00
Zou Nengren
8bbfa19223
remove federation (#3794)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-30 09:08:20 -07:00
Ben Kochie
4eeaef29ea
Add dns64 plugin (#3534)
* 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-26 08:42:23 +01:00