Commit graph

1268 commits

Author SHA1 Message Date
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
cui fliter
ee3999303d
fix some comments (#6052)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-25 11:25:07 -04:00
Dan Salmon
7bced74f51
Fix typo (#6053) 2023-04-25 11:24:49 -04:00
jeremiejig
13e66918e3
plugin/dnssec: on delegation, sign DS or NSEC of no DS. (#5899)
* When returning NS for delegation point, we sign any DS Record or if not
  found we generate a NSEC proving absence of DS. This follow behaviour
  describe in rfc4035 (Section 3.1.4)
* DS request at apex behave as before.
* Fix edge case of requesting NSEC which prove that NSEC does not exist.

Signed-off-by: Jeremiejig <me@jeremiejig.fr>
2023-04-22 22:32:01 +02:00
Yashpal
0862dd1cb5
plugin/kubernetes: expose client-go internal request metrics (#5991) 2023-04-22 18:38:49 +02:00
Chris O'Haver
68816a42a7
update informer for client-go 0.27 (#6038)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2023-04-20 13:24:06 -04:00
Vancl
7db1d4f6e9
Prevent fail counter of a proxy overflows (#5990)
Signed-off-by: vanceli <vanceli@tencent.com>
Signed-off-by: Vance Li <vncl@YingyingM1.local>
Co-authored-by: vanceli <vanceli@tencent.com>
2023-04-16 16:08:56 +02:00
Amila Senadheera
8e8231d627
[rewrite] Introduce cname target rewrite rule to rewrite plugin (#6004)
* cname target rewrite part in answer sec
tion

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

* upstream request

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

* fix looping issue

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

* support exact, prefix, suffix, substring, and regex types for cname rewrite

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

* support any qtype, corrected prefix, suffix, substring types behavior

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

* unit tests added, mocked the upstream call

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

* fix lint errors

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

* add newline to fix test issue

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

* add default rewrite type, add readme

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

* readme grammar fix

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

* reuse rewrite types

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

* comment fixed

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

---------

Signed-off-by: amila <amila.15@cse.mrt.ac.lk>
2023-04-13 08:19:36 -04:00
W. Trevor King
0063d7a80c
plugin/health: Poll localhost by default (#5934)
defaulting to localhost makes things explicit in CoreDNS code, and will give us valid URIs in
the logs

Signed-off-by: W. Trevor King <wking@tremily.us>
2023-03-29 09:57:54 -04:00
Pat Downey
f823825f8a
plugin/forward: Allow Proxy to be used outside of forward plugin. (#5951)
* plugin/forward: Move Proxy into pkg/plugin/proxy, to allow forward.Proxy to be used outside of forward plugin.

Signed-off-by: Patrick Downey <patrick.downey@dioadconsulting.com>
2023-03-24 08:55:51 -04:00
Vancl
47dceabfc6
plugin/k8s_extenral: Supports fallthrough option (#5959)
* Add fallthrough option to k8s_external plugin to allow transitioning control to the next plugin if the domain is not found
* Exit on start up if required plugin is not present.

Signed-off-by: vanceli <vanceli@tencent.com>

---------

Signed-off-by: vanceli <vanceli@tencent.com>
Co-authored-by: vanceli <vanceli@tencent.com>
2023-03-24 08:52:44 -04:00