Commit graph

1296 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
Nicolai Søborg
20c5f55802
root: explicit mark dnssec support (#6753)
DNSSEC keys can be specified relative to `root`: https://github.com/coredns/coredns/blob/master/plugin/dnssec/setup.go#L135

Co-authored-by: Nicolai Søborg <NicolaiSoeborg@users.noreply.github.com>
2024-10-24 15:17:25 -04:00
Keith Coleman
7078f1576f
feat: dnssec load keys from AWS Secrets Manager (#6618)
feat: dnssec load keys from AWS Secrets Manager
Signed-off-by: kcolemangt <20099734+kcolemangt@users.noreply.github.com>
2024-10-24 14:50:04 -04:00
AdamKorcz
04d00b0083
fuzzing: fix broken oss-fuzz build (#6880)
Signed-off-by: Adam Korczynski <adam@adalogics.com>
2024-10-24 14:33:58 -04:00
Tobias Klauser
23e9004f63
Replace k8s.io/utils/strings/slices by Go stdlib slices (#6863)
Use the functionality provided by the Go standard library slices package
since Go 1.21 instead of the deprecated functions in the
k8s.io/utils/strings/slices package.

Signed-off-by: Tobias Klauser <tobias@isovalent.com>
2024-10-24 10:24:08 -04:00
Nikita Usatov
92724349dc
plugin/rewrite: Add "revert" parameter for EDNS0 options (#6893)
* plugin/rewrite: Add "revert" parameter for EDNS0 options

Signed-off-by: Nikita Usatov <nikitakosatka@yandex.ru>

* Update README

Signed-off-by: Nikita Usatov <nikitakosatka@yandex.ru>

* plugin/rewrite: Update tests

Signed-off-by: Nikita Usatov <nikitakosatka@yandex.ru>

* plugin/rewrite: Revert change to improve coverage

Signed-off-by: Nikita Usatov <nikitakosatka@yandex.ru>

---------

Signed-off-by: Nikita Usatov <nikitakosatka@yandex.ru>
2024-10-07 13:47:56 -04:00
TAKAHASHI Shuuji
5100feebd3
Fix "GitHub" capitalization (#6806)
Signed-off-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
2024-10-01 12:15:42 -04:00
Lin-1997
d4e351c3fd
fix: plugin/auto: call OnShutdown() for each zone at its own OnShutdown() (#6705)
Signed-off-by: Lin-1997 <1204878199@qq.com>
2024-10-01 12:07:37 -04:00
chenylh
ae0b79313b
feature: log queue and buffer memory size configuration (#6591)
* feature: log queue and buffer memory size configuration

Signed-off-by: chenyuliang5 <chenyuliang@jd.com>
2024-10-01 11:49:59 -04:00
Till Riedel
6efa95ca98
plugin/bind: add zone for link-local IPv6 instead of skipping (#6547)
* add zone for link-local IPv6 instead of skipping

Signed-off-by: Till Riedel <riedel@teco.edu>

* revert changed error handling for IPs

Signed-off-by: Till Riedel <riedel@teco.edu>

---------

Signed-off-by: Till Riedel <riedel@teco.edu>
2024-10-01 11:47:56 -04:00
Chris O'Haver
f4f0d55dce
only create PTR records for endpoints with hostname defined (#6898)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2024-09-30 10:32:13 -04:00
Jason Joo
4e7bd5a51c
fix: reverter should execute the reversion in reversed order (#6872)
Signed-off-by: Jason Joo <hblzxsj@gmail.com>
2024-09-11 21:07:02 -04:00
Anifalak
ee4d26b780
plugin/etcd: fix etcd connection leakage when reload (#6646)
Signed-off-by: zhongyuanjun <zhongyuanjun@bytedance.com>
Co-authored-by: zhongyuanjun <zhongyuanjun@bytedance.com>
2024-08-27 09:35:19 -04:00
Manuel Rüger
ebbbb453be
kubernetes: Add useragent (#6484)
In kubernetes' audit logs you'll see:

"userAgent":"coredns/v0.0.0 (linux/amd64) kubernetes/$Format"

This change adds a userAgent to the requests made by CoreDNS against the kubernetes API:

"userAgent":"CoreDNS/v1.11.1 git_commit:ae2bbc29be1aaae0b3ded5d188968a6c97bb3144 (linux/amd64/go1.22)"

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2024-08-26 16:45:39 -04:00
Ben Kochie
d85c3b648d
Update build (#6836)
* Update build

* Update Go to 1.23.0
* Update minimum Go version to 1.22.
* Update golangci-lint to v1.60.1.
* Make GitHub action version hash/tag consistent.
* Increase dependabot open PRs from 5 to 20.

Signed-off-by: SuperQ <superq@gmail.com>

* Fixup lint issue.

Signed-off-by: SuperQ <superq@gmail.com>

---------

Signed-off-by: SuperQ <superq@gmail.com>
2024-08-18 07:13:53 +02:00
Ben Kochie
ec8e3844a9
Update grpc library use (#6826)
Replace deprecated grpc Dial/DialContext with grpc.NewClient.

Signed-off-by: SuperQ <superq@gmail.com>
2024-08-18 06:13:10 +02:00
Kevin Lyda
c742ec03f5
Upgrade antonmedv/expr to expr-lang/expr (#6814)
* Upgrade antonmedv/expr to expr-lang/expr

The project has moved.  This also upgrades from 1.15.5 to 1.16.9.
The expr project lacks a changelog but tests pass and the changes don't
seem to change it much - but there were a lot of changes.

Signed-off-by: Kevin Lyda <kevin@lyda.ie>

* Upgrade build image

In reviewing the build results I see the old build image was deprecated so
upgrading to something newer.

Signed-off-by: Kevin Lyda <kevin@lyda.ie>

---------

Signed-off-by: Kevin Lyda <kevin@lyda.ie>
2024-08-11 08:00:49 -04:00
Paco Xu
e5945d2767
hosts: add hostsfile as label for coredns_hosts_entries (#6801)
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2024-08-06 07:13:22 -04:00
cedar-gao
a6338e924e
optimize the performance for high qps (#6767)
Signed-off-by: gaoxuesong <gaoxuesong@jd.com>
2024-07-02 08:08:56 -04:00
Nathan Currier
626333a1b3
Fix zone parser error handling (#6680)
Signed-off-by: Nathan Currier <nathan.currier@broadcom.com>
2024-07-01 11:27:50 -04:00
Jasper Bernhardt
2e9986c622
Add alternate option to forward plugin (#6681)
Allows the forward plugin to execute the next plugin based on the return code. Similar to the externally mainted alternate plugin https://github.com/coredns/alternate

Based on the idea of chrisohaver@ in #6549 (comment)
Also incoperated the request to rename `alternate` to `next` as an option

I am having issues adding a proper test for functionality. Primarily, I do not know the code base enough and having multiple `dnstest.NewServer` with ResponseWriter does not work. From my testing these are "Singletons'' and only the last defined response writer is used for all servers

Signed-off-by: Jasper Bernhardt <jasper.bernhardt@live.de>
2024-07-01 11:20:12 -04:00
Lin-1997
3f388442cc
fix: plugin/file: return error when parsing the file fails (#6699)
Signed-off-by: Lin-1997 <1204878199@qq.com>
2024-07-01 11:19:33 -04:00
Robbie Ostrow
771d64dbea
[fix:documentation] Clarify autopath README (#6750)
Signed-off-by: Robbie Ostrow <ostrowr@users.noreply.github.com>
2024-07-01 11:18:35 -04:00
Takeshi Yoneda
a7ed346585
dnstap: uses pointer receiver for small response writer (#6644)
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
2024-04-26 15:08:47 -04:00
Manuel Alejandro de Brito Fontes
5b6d8e356c
[plugin/forward] Strip local zone from IPV6 nameservers (#6635)
Signed-off-by: Alejandro de Brito Fontes <aledbf@gmail.com>
2024-04-26 13:12:25 -04:00
Jared Baur
6706ee8419
Return RcodeServerFailure when DNS64 has no next plugin (#6590)
If using a coredns config with only the dns64 plugin specified, the
`Next` plugin that dns64 will attempt to call will be nil, resulting in
a nil pointer dereference. We should return an error instead of
crashing.

Signed-off-by: Jared Baur <jaredbaur@fastmail.com>
2024-04-09 09:52:43 +02:00
James Kang
9b4a00ff4a
chore: remove repetitive word (#6564) 2024-03-23 09:57:33 +00:00
Ben Kochie
0d6e113f90
Enable Prometheus native histograms (#6524)
Add a NativeHistogramBucketFactor parameter to the use of
`NewHistogramVec` in order to enable use of Prometheus Native
Histograms.

This will store automatically computed sparse buckets in CoreDNS.
If a compatible Prometeus requests native histograms this data will
returned instead of the static buckets.

The default factor of 1.05 should provide high quality resolution data.

Signed-off-by: SuperQ <superq@gmail.com>
2024-03-11 16:09:09 -04:00
Snawoot
8e783897a2
forward: respect context (#6483)
Signed-off-by: Vladislav Yarmak <vladislav-ex-src@vm-0.com>
2024-03-07 14:54:28 -05:00
miles-to-go
92b7e658e3
add client labels to k8s plugin metadata (#6475)
Signed-off-by: Nolan Miles <nolanpmiles@gmail.com>
2024-03-07 14:34:09 -05:00
Nakano Masaki
62b23aeae6
fix broken link in webpage (#6488)
Signed-off-by: Masaki Nakano <admin@namachan10777.dev>
2024-03-07 14:24:38 -05:00
jdamick
b2defec33a
removed the mutex locks with atomic bool (#6525)
Signed-off-by: Jeffrey Damick <jdamick@amazon.com>
Co-authored-by: Jeffrey Damick <jdamick@amazon.com>
2024-03-06 13:57:12 -05:00
Keita Kitamura
945db2facd
Fix typo in view plugin README.md (#6457)
Signed-off-by: keita <keitap@gmail.com>
2024-01-09 12:38:17 -05:00
Amila Senadheera
ff40400065
rewrite: fix multi request concurrency issue in cname rewrite (#6407)
* fix concurrent issue with cname rewrite plugin

Signed-off-by: amila <amila.15@cse.mrt.ac.lk>

* add nil check before deref, add AAAA type test case

Signed-off-by: amila <amila.15@cse.mrt.ac.lk>

---------

Signed-off-by: amila <amila.15@cse.mrt.ac.lk>
2023-12-09 07:53:52 -05: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
Chris O'Haver
5617d9e015
plugin/auto: warn when auto is unable to read elements of the directory tree (#6333)
* warn when auto is unable to read elements of the directory tree

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

---------

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2023-12-04 12:51:50 -05:00
journey-c
7765aa87a4
plugin/etcd: the etcd client adds the DialKeepAliveTime parameter (#6351) 2023-11-10 14:17:55 -08:00
guangwu
8964fc2180
chore: use raw string () with regexp.MustCompile to avoid having to escape twice (#6396) 2023-11-10 14:16:47 -08:00
Grant Spence
997c7f9539
plugin/cache: key cache on Checking Disabled (CD) bit (#6354)
* plugin/cache: key cache on Checking Disabled (CD) bit

Key the cache on CD bit, which effectively separates the entries for
queries with CD disabled or enabled.

Signed-off-by: Grant Spence <gspence@redhat.com>
2023-11-10 10:00:47 -05:00
Tom Thorogood
b541b4ea49
Use the correct root domain name in the proxy plugin's TestHealthX tests (#6395)
When packing the empty domain name, miekg/dns can end up creating
corrupt DNS messages. With some planned unpacking changes, this now
trips an error condition and causes these tests to fail. Correct this
by using the root domain explicitly as this gets correctly encoded on
the wire.

Signed-off-by: Tom Thorogood <me+github@tomthorogood.net>
2023-11-08 12:00:32 -08:00
Yong Tang
430e3ad986
Update expr from 1.13.0 to 1.15.3 (#6375)
Manually update expr to resolve test failures

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2023-10-27 22:44:11 +02:00
Sri Harsha
4c69549832
Handle UDP responses that overflow with TC bit with test case (#6277)
Signed-off-by: SriHarshaBS001 <SriHarshaBS009@gmail.com>
2023-09-07 15:01:45 -04:00
pschou
5ace19d455
plugin/rewrite: add rcode as a rewrite option (#6204)
* plugin/forward add ignore_server_failure for masking upstream server faults

Signed-off-by: schou <pschou@users.noreply.github.com>

* Switch from a ignore_server_fail to a rewrite rcode type.

Signed-off-by: schou <pschou@users.noreply.github.com>

* trim down the tests

Signed-off-by: schou <pschou@users.noreply.github.com>

* fixing readme TTL and using map for rcode

Signed-off-by: schou <pschou@users.noreply.github.com>

* add newline

Signed-off-by: schou <pschou@users.noreply.github.com>

---------

Signed-off-by: schou <pschou@users.noreply.github.com>
2023-08-26 22:20:12 -04:00
Chris O'Haver
678d0333af
Revert "plugin/forward: Continue waiting after receiving malformed responses (#6014)" (#6270)
This reverts commit 604a902e2c.
2023-08-14 20:33:37 -04:00
Yuheng
90d55611a2
Plugin dnstap: add support for "extra" field in payload (#6226)
* dnstap: add 'extra' field

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* dnstap: add setup_test for 'extra' field

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* udnstap: update document and test

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* dnstap: update setup_test for more coverage

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* dnstap: add TapMessageWithMetadata function to Dnstap

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* dnstap: adapt dnstap and forward plugins to use TapMessageWithMetadata

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* change TapMessageWithMetadata function

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* tab inconsistency fix

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* fix replacer to support empty state

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* add replacer test for empty status parameter

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* dnstap: update unit test for 'extra' field

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* clean up code

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* gofmt fix & static analysis fix

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

* dnstap: refactor

Signed-off-by: chenyuheng <chenyuheng99@qq.com>

---------

Signed-off-by: chenyuheng <chenyuheng99@qq.com>
2023-08-14 11:01:13 -07:00
Zhizhen He
5de473da1c
fix: remove unnecessary conversion (#6258)
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-08-14 15:14:09 +02:00
Zhizhen He
2fe5890d8b
Fix typos (#6235)
* Fix typos and add todo to fix spelling of dnsutil.MaximumDefaulTTL

Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
2023-08-10 11:06:48 -04:00
Chris O'Haver
6c8581445e
fix keepttl parsing (#6250)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2023-08-09 08:32:50 -04: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
Diogenes Pelisson
a0e734e01b
implement Name function on secondary plugin (#6230)
Signed-off-by: Diogenes Pelisson <diogenes.pelisson@gmail.com>
2023-07-30 15:38:12 +02:00