1500 Commits

Author SHA1 Message Date
Immanuel Tikhonov
17142359e0 fix: reject unknown chaos block options (#8121) 2026-05-24 05:58:11 -07:00
Ville Vesilehto
d9c6b9b8b4 fix: reject unknown trace and dnstap block options (#8120) 2026-05-21 16:06:25 -07:00
Immanuel Tikhonov
1fbc686758 fix: reject unknown ready plugin properties (#8119)
Signed-off-by: immanuwell <pchpr.00@list.ru>
2026-05-21 22:29:59 +03:00
JUN YANG
3e762bc603 Remove redundant code (#8072)
Signed-off-by: Yang Jun <yang.jun22@zte.com.cn>
Signed-off-by: 杨军10092085 <yang.jun22@zte.com.cn>
2026-05-21 22:11:29 +03:00
weiguozhang
65d15af3a9 pkg/tls: remove duplicate cipher suites (#8118)
Signed-off-by: Weiguo Zhang <weiguozhang1990@163.com>
2026-05-20 23:54:11 -07:00
James R T
84faec64c3 fix(azure): apply access mode to every zone in the same block (#8110) 2026-05-20 08:06:37 -07:00
Ville Vesilehto
f8dffa7fc2 feat(secondary): add fallthrough support (#8041) 2026-05-20 00:13:03 -07:00
Umut Polat
b1a7fc8db1 fix(cache): prefer positive cache over SERVFAIL in ncache (#8003)
When serve_stale is enabled, a cached SERVFAIL in ncache shadows a valid
positive entry in pcache because ncache is always checked first. SERVFAIL
is transient and should not mask a known-good answer.

When the ncache hit is a SERVFAIL, check pcache for a valid entry before
returning the SERVFAIL. NXDOMAIN and NODATA are unaffected and still
follow the existing ncache-first lookup per RFC 2308.

Fixes #7956

Signed-off-by: umut-polat <52835619+umut-polat@users.noreply.github.com>
2026-05-19 20:28:35 -07:00
Endre Szabo
35391dd8a9 plugin/file: trigger reload of zones based on mtime (#8085)
* Added fs.FileInfo.ModTime() based reload feature

Signed-off-by: Endre Szabo <git@end.re>

* Updated the plugin documentation.

Signed-off-by: Endre Szabo <git@end.re>

---------

Signed-off-by: Endre Szabo <git@end.re>
2026-05-19 19:43:46 -07:00
Endre Szabo
ee7ff82cf5 plugin/dnstap: feature: added incoming connection support (#8086)
* plugin/dnstap: added incoming connection support feature to dnstap plugin

Signed-off-by: Endre Szabo <git@end.re>

* fixed problems pointed out by ci linter

Signed-off-by: Endre Szabo <git@end.re>

---------

Signed-off-by: Endre Szabo <git@end.re>
2026-05-19 19:23:53 -07:00
Charlie Tonneslan
f4f767fb4e plugin/file: canonicalize escape form in owner names (#8109)
The miekg/dns zone parser preserves whichever text form the input
used for an escaped byte. RFC 1035 §5.1 lets the same byte appear
as \DDD (decimal) or \c (literal character), so a zone file
written with has\046dot.campus.edu. is stored under that literal
string. Incoming queries, by contrast, arrive on the wire and are
unpacked by miekg/dns into the canonical form has\.dot.campus.edu.
The two strings don't compare equal in the tree, so the record is
silently unreachable.

Pack-then-unpack the owner name on Insert so the stored key uses
the same canonical form as anything that comes off the wire. Only
runs when the name contains a backslash, so the common case is a
no-op string compare.

Fixes #8012

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
2026-05-19 18:08:16 -07:00
Syed Azeez
b2cb44b966 feat(cache): add optional verify timeout to serve_stale (#8070) 2026-05-06 00:32:28 -07:00
Peppi-Lotta
8c5ec14e31 Fix broken links (#8051)
Signed-off-by: peppi-lotta <peppi-lotta.saari@est.tech>
2026-04-16 20:31:32 +03:00
rpb-ant
50cbaf87a0 plugin/file: introduce snapshot()/setData() accessors for zone data (#8040)
Signed-off-by: Ryan Brewster <rpb@anthropic.com>
2026-04-12 20:34:36 +03:00
andreyrusanov-ec
8a28dc9c7d fix(dnssec) TestDelegationUnSigned: Potential nil pointer dereference (#8042)
Signed-off-by: Andrey Rusanov <andrey.rusanov@edgecenter.ru>
2026-04-12 11:34:23 +03:00
JUN YANG
57a95e2677 [BUG] plugin/ready: fix Reset list of readiness plugins (#8035)
Signed-off-by: 杨军10092085 <yang.jun22@zte.com.cn>
2026-04-11 13:15:28 +03:00
rpb-ant
0ed3aae547 Fix data race in xfr.go (#8039)
Signed-off-by: Ryan Brewster <rpb@anthropic.com>
2026-04-11 11:39:31 +03:00
Yong Tang
c0e6e7cef3 core: Add full TSIG verification in DoH transport (#8013)
* core: Add full TSIG verification in DoH transport

This PR add full TSIG verification in DoH using dns.TsigVerify()
7943

---------

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2026-04-09 15:24:00 +03:00
Ville Vesilehto
4c71636a71 fix(auto): resolve symlinked directory before walk (#8032) 2026-04-08 14:38:01 -07:00
rpb-ant
010dc1e2b7 Allow selectively exporting all Go runtime metrics (#7990)
Signed-off-by: Ryan Brewster <rpb@anthropic.com>
2026-04-08 21:38:19 +03:00
Ville Vesilehto
5643d41ba7 fix(tls): use temp dir for keylog test path (#8010) 2026-04-04 11:37:51 -07:00
Umut Polat
61f4145506 fix(transfer): batch AXFR records by message size instead of count (#8002) 2026-04-04 11:35:27 -07:00
Umut Polat
2263340fab fix(dnsserver): allow view server blocks in any declaration order (#8001)
When using the view plugin, filtered and unfiltered server blocks can
share the same zone and port. The zone overlap validation rejected this
configuration when the unfiltered block was not declared last, because
filtered configs treated an already-registered zone as an error.

Skip the 'already defined' check for configs that have filter functions,
since they are expected to coexist with an unfiltered catch-all block on
the same zone/port.

Fixes #7733

Signed-off-by: umut-polat <52835619+umut-polat@users.noreply.github.com>
2026-04-04 20:45:55 +03:00
Ville Vesilehto
4eb6eca9f0 fix(dnssec): return nil from ParseKeyFile on error (#8000) 2026-04-04 10:40:47 -07:00
Ville Vesilehto
cb40d84c85 fix(dnssec): return nil sigs on sign error (#7999) 2026-04-04 10:40:29 -07:00
Ville Vesilehto
510977c476 fix(dnssec): avoid caching empty signing results (#7996) 2026-04-01 14:20:15 -07:00
Ville Vesilehto
6d6c50db3a fix(dnssec): add defensive nil checks (#7997) 2026-04-01 14:19:54 -07:00
Ville Vesilehto
503c2d7ea3 fix(kubernetes): sanitize non-UTF-8 host in metrics (#7998) 2026-04-01 14:19:29 -07:00
Ville Vesilehto
2ba4340362 chore: bump golangci-lint to v2.11.4 (#7983) 2026-03-30 14:39:09 -07:00
rpb-ant
20626a7464 Add an atomic.Bool to singleflight prefetching (#7963)
Also updated plugin to document single-flighting

Signed-off-by: Ryan Brewster <rpb@anthropic.com>
2026-03-30 23:18:24 +03:00
Ville Vesilehto
0ba8e3c850 test(dnstap): fix flaky TestReconnect (#7982) 2026-03-29 17:03:08 -07:00
Ville Vesilehto
0e9a51410a lint(revive): fix unreachable-code violation (#7979) 2026-03-29 17:02:39 -07:00
Ville Vesilehto
6720959b8b lint(revive): fix unused-parameter violations (#7980) 2026-03-29 17:02:20 -07:00
Ville Vesilehto
6af8fd46fe lint(revive): fix unnecessary-stmt violations (#7978) 2026-03-29 17:02:03 -07:00
Ville Vesilehto
867cd8fd6b lint(revive): fix indent-error-flow violations (#7977) 2026-03-29 17:01:22 -07:00
Ville Vesilehto
7fd983b02c lint(revive): fix context-as-argument violations (#7976) 2026-03-29 17:01:03 -07:00
Ville Vesilehto
61330515de test(forward): restore defaultTimeout (#7981) 2026-03-29 17:00:30 -07:00
Ville Vesilehto
54b06d9a3b lint(revive): fix early-return violations (#7974) 2026-03-29 16:59:22 -07:00
Minghang Chen
34acf8353f proxyproto: add UDP session tracking for Spectrum PPv2 (#7967) 2026-03-28 15:06:36 -07:00
Ingmar Van Glabbeek
12d9457e71 plugin/file: expand SVCB/HTTPS record support (#7950)
* plugin/file: expand SVCB/HTTPS record support

Add proper SVCB (type 64) and HTTPS (type 65) handling:

- Additional section processing: include A/AAAA glue for in-bailiwick
  SVCB/HTTPS targets, matching existing SRV/MX behavior
- Target name normalization: lowercase SVCB/HTTPS Target on zone insert,
  consistent with CNAME/MX handling
- Metrics: add TypeSVCB to monitored query types (TypeHTTPS was already
  present)
- Test helpers: add SVCB()/HTTPS() constructors and Section comparison
  cases
- Tests: basic queries with glue, AliasMode, wildcards, NoData, NXDOMAIN,
  target normalization, and DNS-AID private-use key (65400-65408)
  round-trip

Signed-off-by: Ingmar <ivanglabbeek@infoblox.com>

* plugin/file: simplify HTTPS target access via field promotion

dns.HTTPS embeds dns.SVCB, so .Target is directly accessible
without the redundant .SVCB. qualifier. Fixes gosimple S1027.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ingmar <ivanglabbeek@infoblox.com>

---------

Signed-off-by: Ingmar <ivanglabbeek@infoblox.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 11:46:41 +02:00
Ilya Kulakov
a8caf4c375 plugin/tls: Add the keylog option to configure TLSConfig.KeyLogWriter (#7537)
* tls: Add the keylog option to configure TLSConfig.KeyLogWriter

Signed-off-by: Ilya Kulakov <kulakov.ilya@gmail.com>

* tls: Close keylog file on instance shutdown.

Signed-off-by: Ilya Kulakov <kulakov.ilya@gmail.com>

---------

Signed-off-by: Ilya Kulakov <kulakov.ilya@gmail.com>
2026-03-27 21:10:13 +02:00
Seena Fallah
471d62926d plugin/tsig: add require_opcode directive for opcode-based TSIG (#7828)
Extend the tsig plugin to require TSIG signatures based on DNS opcodes,
similar to the existing qtype-based requirement.

The new require_opcode directive accepts opcode names (QUERY, IQUERY,
STATUS, NOTIFY, UPDATE) or the special values "all" and "none".

This is useful for requiring TSIG on dynamic update (UPDATE) or zone
transfer notification (NOTIFY) requests while allowing unsigned queries.

Example:
```
  tsig {
    secret key. NoTCJU+DMqFWywaPyxSijrDEA/eC3nK0xi3AMEZuPVk=
    require_opcode UPDATE NOTIFY
  }
```

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2026-03-27 21:05:49 +02:00
Ville Vesilehto
49b18b8af6 test(dnssec): fix err in TestZoneSigningDouble (#7969) 2026-03-26 20:33:55 -07:00
Yong Tang
a025712827 plugin/transfter: Fix longestMatch to select the most specific zone correctly. (#7949)
* plugin/transfter: Fix longestMatch to select the most specific zone correctly.

This PR Fix longestMatch to select the most specific zone correctly.The previous implementation used lexicographic string comparison, which could choose the wrong zone; this change selects the longest matching zone instead.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Tie breaker

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

---------

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2026-03-24 20:35:20 +02:00
rpb-ant
31e16025ef plugin/cache: prefetch without holding a client connection (#7944) 2026-03-24 08:47:11 -07:00
Syed Azeez
f582a01dc9 fix(kubernetes): record cluster_ip services in dns_programming_duration metric (#7951)
Signed-off-by: Azeez Syed <syedazeez337@gmail.com>
2026-03-24 05:29:28 -07:00
Yong Tang
f67994442a core: Reject oversized GET dns query parameter of DoH (#7926)
* core: Reject oversized GET dns query parameter of DoH

The DoH POST path limits request size using http.MaxBytesReader(..., 65536), but the GET path passes the dns query value directly to base64ToMsg() with no equivalent bound.

This PR adds length check.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

---------

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2026-03-18 09:38:44 +02:00
Ville Vesilehto
ece6a68b04 docs(cache): clarify TTL directive (#7941) 2026-03-17 11:55:11 -07:00
Ville Vesilehto
5a63eb61a3 fix(file): protect Zone.Expired with mutex (#7940) 2026-03-16 14:08:03 -07:00
Yong Tang
c0d676e026 Fix case-sensitive zone handling in the transfer plugin for AXFR/IXFR. (#7899)
This PR fixes Fix case-sensitive zone handling in the transfer plugin for AXFR/IXFR, raised in 7898

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2026-03-15 14:27:03 -07:00