Commit graph

1250 commits

Author SHA1 Message Date
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
Marcos Mendez
48c40ae1cd
fix: clouddns plugin answers limited to one response (#5986)
* inserts all records in the loop. checks for insert errors. adds test. fixes #5985

Signed-off-by: Marcos Mendez <marcos_mendez@homedepot.com>
2023-03-23 11:34:11 -04:00
Sebastian Dahlgren
80b40c159e
DoH: Allow http as the protocol (#5762)
This change avoids the hard coding of HTTPS, allowing flexibility in whether HTTP or HTTPS is used.

Signed-off-by: Sebastian Dahlgren <sebdah@fb.com>
2023-03-03 09:44:38 -05:00
Denis MACHARD
83fc3bb5da
dnstap tls support (#5917)
Signed-off-by: dmachard <5562930+dmachard@users.noreply.github.com>
2023-02-20 18:34:48 -05:00
Chris O'Haver
77c7c0b4cb
send notifies after adding zones all zones (#5774)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2023-02-15 13:25:02 -05:00
Gabor Dozsa
52f1c64e7d
plugin/loadbalance: Improve weights update (#5906)
Don't lock weights for duration of parsing weight file. Add
missing check to reject zero weight values.

Signed-off-by: Gabor Dozsa <gabor.dozsa@ibm.com>
2023-02-15 12:43:19 -05:00
Fish-pro
1b001ec229
fix typo for log output (#5909)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-10 09:39:55 -05:00
Fish-pro
039a4d87e2
Use http constants instead of string (#5908)
Signed-off-by: Fish-pro <zechun.chen@daocloud.io>
2023-02-09 12:29:49 +01:00
Gerhard Tan
b7279d1f66
plugin/forward: fix broken tap plugins when dnstap plugins specified (#5890)
* plugin/forward: fix broken tap plugins when dnstap plugins specified

---------

Signed-off-by: Gerhard Tan <gwohau.tan@gmail.com>
2023-01-30 14:38:15 -05:00
Gabor Dozsa
7da2cedaf0
Add weighted-round-robin policy to loadbalance plugin (#5662)
* Add weighted-round-robin policy to loadbalance plugin

Signed-off-by: Gabor Dozsa <gabor.dozsa@ibm.com>
2023-01-27 11:36:56 -05:00
Arthur Outhenin-Chalandre
bf7c2cf37b
plugin/cache: add a new keepttl option (#5879)
adds a new option `keepttl` to the cache plugin

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
2023-01-27 11:35:24 -05:00
Vico Chu
cbbe9da890
plugin/etcd: update documentation (#5847)
Signed-off-by: Vico Chu <vico24826@gmail.com>

Signed-off-by: Vico Chu <vico24826@gmail.com>
2023-01-11 08:31:46 -05:00
Rich
e7ad486b50
plugin/timeouts - Allow ability to configure listening server timeouts (#5784) 2022-12-28 12:14:16 +01:00
Stephen Kitt
60b7161fee
Drop obsolete client-go auth plugins (#5806)
* Drop obsolete client-go auth plugins

The OpenStack plugin is no longer available, even in version 0.24.4 of
client-go; see
https://github.com/kubernetes/client-go/blob/v0.24.4/plugin/pkg/client/auth/openstack/openstack_stub.go
It is replaced by the client-keystone-auth credential plugin. The
plugin has been entirely removed in client-go 0.26.0, which breaks the
build when any other dependency pulls in client-go 0.26.0 or later.

The GCP plugin is deprecated in K8s 1.22+ and unavailable in 1.26+
(although it is still stubbed in client-go 0.26.0). Is it replaced by
the gke-gcloud-auth-plugin credential plugin.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

* Update plugin/kubernetes/setup.go

Signed-off-by: Stephen Kitt <skitt@redhat.com>
Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2022-12-13 15:49:03 -05:00
LAMRobinson
c3228615e0
plugin/kubernetes: error NXDOMAIN for TXT lookups (#5737)
plugin/kubernetes: fix NXDOMAIN/NOERROR responses for TXT queries

Signed-off-by: Laurence Robinson <laurence_robinson@live.co.uk>
Co-authored-by: Laurence Robinson <laurence.robinson@deshaw.com>
2022-12-13 15:36:46 -05:00
Chris O'Haver
7813b6e090
plugin/geoip: Add GLSB example (#5795)
* add glsb example

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-12-07 12:27:23 +01:00
Ben Kaplan
9b94696b11
plugin/edns: remove truncating of question section on bad EDNS version (#5787)
* plugin/edns: remove truncating of question section on bad EDNS version

EDNS requests of "Unknown Version" removed the query section altogether.
Not sure why since this is not require (see [link](https://kb.isc.org/docs/edns-compatibility-dig-queries)

This cause issues with DNS solutions that uses this information (initial queried name, type and class) in order to route the response to the right client (e.g. PDNS).

The change here is to keep the inital query section as is.

Signed-off-by: Ben Kaplan <ben.kaplan@redis.com>

* adding tests for edns0 version check

Signed-off-by: Ben Kaplan <ben.kaplan@redis.com>

* adding tests for non-edns0 version check

Signed-off-by: Ben Kaplan <ben.kaplan@redis.com>

Signed-off-by: Ben Kaplan <ben.kaplan@redis.com>
2022-12-01 09:07:13 -05:00
Chris O'Haver
04a30198c3
plugin/dnstap: Fix behavior when multiple dnstap plugins specified (#5773)
* fix multiple dnstap plugins behavior

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-11-28 10:33:31 -05:00
Chris O'Haver
47c99dc73b
dont match external services when endpoint is specified (#5734)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2022-11-04 09:54:57 -04:00