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
Petr Menšík
52f0348312
Change default value to 1232 ( #6183 )
...
* Change default value to 1232
As specified by DNS flag day 2020, good and decent default value
avoiding fragmentation issues should be 1232. It is quite likely 1500
would work reliably on local ethernet networks.
Value 512 is set implicitly and must be used for all clients, which did
not include OPT RR with explicit value they support.
Since MR #5368 it should work correctly.
Signed-off-by: Petr Menšík <pemensik@redhat.com >
* Adapt bufsize test to new default value
Check also buffer size smaller than legacy value is not accepted.
Signed-off-by: Petr Menšík <pemensik@redhat.com >
* Update bufsize documentation
Mention also increasing request size is not possible, it can only reduce
the accepted size.
Signed-off-by: Petr Menšík <pemensik@redhat.com >
---------
Signed-off-by: Petr Menšík <pemensik@redhat.com >
2023-07-10 07:49:52 -07:00
Pat Downey
ea293da1d6
Fix forward metrics for backwards compatibility ( #6178 )
2023-07-04 16:35:55 +02:00
rokkiter
6e1263d3d9
fix ports panic ( #6179 )
...
Signed-off-by: rokkiter <101091030+rokkiter@users.noreply.github.com >
2023-06-26 09:42:03 -04:00
Dan Wilson
5b5a6ac6ad
plugin/kubernetes: filter ExternalName services from matching double subdomain wildcard ( #6162 )
...
remove double subdomain reference from review feedback
not subdoman
Signed-off-by: emaildanwilson <dan@controlplane.com >
Co-authored-by: emaildanwilson <dan@controlplane.com >
2023-06-19 08:42:17 -04:00
Eng Zer Jun
b868350fc2
test: use t.TempDir to create temporary test directory ( #6164 )
2023-06-17 15:21:01 +02:00
Chris O'Haver
06cd843918
plugin/kubernetes: Remove Endpoint and EndpointSlice v1beta Support ( #6147 )
...
* remove endpoint and endpointslicev1beta watch support
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* adjust readme
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* informer object changes
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* remove unused funcs
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
---------
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
2023-06-12 08:22:57 -07:00
Ondřej Benkovský
8c489bd400
replace reviewdog fully by golangci-lint ( #6139 )
...
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com >
2023-06-09 18:08:23 +02:00
Chris O'Haver
6d3db023fe
plugin/kubernetes: fix headless/endpoint query panics when endpoints are disabled ( #6137 )
...
* always create listers, so we dont panic
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
---------
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
2023-06-07 16:22:28 -04:00
Chris O'Haver
d3965b8b60
Revert "plugin/tls: respect the path specified by root plugin ( #5944 )" ( #6136 )
...
This reverts commit d0375bc026 .
2023-06-01 14:07:58 -04:00
Marius Kimmina
d0375bc026
plugin/tls: respect the path specified by root plugin ( #5944 )
...
Signed-off-by: Marius Kimmina <mar.kimmina@gmail.com >
2023-06-01 08:56:57 -04:00
yyzxw
e4be859d48
refactor: use standard library instead of isIn ( #6125 )
...
Signed-off-by: yyzxw <1020938856@qq.com >
Signed-off-by: xiaowu.zhu <xiaowu.zhu@daocloud.io >
2023-05-29 09:53:55 +02:00
Justin
7231bb0881
plugin/forward: fix descriptions in README.md ( #6123 )
...
Signed-off-by: Justin <cattyhouse@users.noreply.github.com >
2023-05-26 17:01:06 -04:00
junhwong
917489e71c
add support unix socket for GRPC ( #5943 )
2023-05-26 14:35:34 +02:00
Catena cyber
31ff926ea1
fuzz: fix forward plugin target ( #6115 )
...
Signed-off-by: Philippe Antoine <contact@catenacyber.fr >
2023-05-25 09:09:56 -04:00
Ayato Tokubi
83e94a91b9
Bump golang to 1.20.0 ( #6070 )
...
Signed-off-by: Ayato Tokubi <atokubi@redhat.com >
2023-05-04 10:47:18 +02:00
Ben Kochie
3f6dfbd2a7
Fix temp file close error ( #6068 )
...
Avoid Go 1.20 test error by not attempting to close the testing temp
file unless there was an error in Read().
* Use a CreateTemp() to create unique test files.
* Defer the deletion of the temp file.
Woarkaround for: https://github.com/golang/go/issues/59938
Signed-off-by: SuperQ <superq@gmail.com >
2023-05-03 13:53:48 -04:00
Chris O'Haver
604a902e2c
plugin/forward: Continue waiting after receiving malformed responses ( #6014 )
...
* forward: continue waiting after malformed responses
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* add test
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* fix test
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* clean up
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* clean up
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* move test to /test/. Add build tag.
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* install libpcap-dev for e2e tests
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* sudo the test
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* remove stray err check
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* disable the test
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* use -exec flag to run test binary as root
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* run new test by itself in a new workflow
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* fix test name
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* only for udp
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* remove libpcap test workflow action
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* remove test, since it cant run in ci
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
* and remove gopacket package
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
---------
Signed-off-by: Chris O'Haver <cohaver@infoblox.com >
2023-04-29 11:52:00 +02:00
Yashpal
1b95a6042d
plugin/kubernetes: rename client-go metrics label "url" to "host" ( #6040 )
2023-04-25 20:26:57 +02:00