4219 Commits

Author SHA1 Message Date
Miek Gieben
01abd80e27 DSO: Use Stateful as the suffix
DSO is the acronym from rfc 8490, but use the more wordly Stateful, this
allows for a nicer opcode name RcodeStateful and later for a Stateful
(StatefulType?) table registering DSO Type Code Registry.

Signed-off-by: Miek Gieben <miek@miek.nl>
2025-04-20 09:37:03 +02:00
Rob Gill
64211b39d1
Add the rcode DSO-TYPE Not Implemented / RFC8490 (#1648)
Signed-off-by: Rob Gill <rrobgill@protonmail.com>
2025-04-20 09:22:51 +02:00
Miek Gieben
8ec9f67469
Upgrade all deps (#1647)
Signed-off-by: Miek Gieben <miek@miek.nl>
2025-04-09 19:50:27 +02:00
Miek Gieben
8a570c6b43
A comment concerning newline while scanning (#1645)
* Add explaning comment

explain how a newline can end up in a domain name while scanning a zonefile

Signed-off-by: Miek Gieben <miek@miek.nl>

* also use 1.24 in the build matrix

Signed-off-by: Miek Gieben <miek@miek.nl>

---------

Signed-off-by: Miek Gieben <miek@miek.nl>
2025-04-06 16:46:24 +02:00
taoso
739cf21247
Return error for empty target (#1627)
* Return error for empty target

* The @ is more important then this corner case and also happens more often
2025-04-06 16:41:54 +02:00
Miek Gieben
8b1c521bca Release 1.1.65 v1.1.65 2025-04-06 16:24:20 +02:00
Viktor Oreshkin
42d8cc507b
Avoid sendmsg control messages on darwin (#1643)
sendmsg with PKTINFO is broken on darwin, so don't use it

udp_windows is renamed to udp_no_control since it's no longer exlusive
to windows, and is used on darwin too
2025-03-28 16:07:47 +01:00
Miek Gieben
ca3b34e08b
Document how to create RRs without rdata (#1642)
Put docs on the ANY type, also reference this from the dynamic updates
stuff.

Signed-off-by: Miek Gieben <miek@miek.nl>
2025-03-19 15:42:15 +01:00
Miek Gieben
f83d075be8 Release 1.1.64 v1.1.64 2025-03-18 16:56:14 +01:00
frcroth
d912518784
Add RESINFO rr (#1641)
* Add RESINFO rr

* Update scan_rr.go

---------

Co-authored-by: Miek Gieben <miek@miek.nl>
2025-03-18 12:55:06 +01:00
Christian Elmerot
8d0c4128de
Add support for Compact Answers OK flag in EDNS (#1639)
Compact Answers OK flag is a signal that a queryer or server understand
and can validate Compact Denial of Existance answers allowing RCODE
NXDOMAIN restoration with single NSEC/NSEC3.
Flag is allocated by IANA: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-13
Compact Denial of Existance: https://www.iana.org/go/draft-ietf-dnsop-compact-denial-of-existence-07

Co-authored-by: Christian Elmerot <elmerot@cloudflare.com>
2025-03-12 19:03:33 +01:00
Stéphane Bortzmeyer
6425a084b8
Add the check-soa program, which uses the library (#1638)
Co-authored-by: Stephane Bortzmeyer <stephane+framagit@bortzmeyer.org>
2025-03-10 19:52:10 +01:00
Miek Gieben
1c19e49014 Manually run a go get -u
Signed-off-by: Miek Gieben <miek@miek.nl>
2025-02-24 15:21:19 +01:00
Miek Gieben
494e4d28eb Merge branch 'master' of github.com:miekg/dns 2025-02-24 15:20:39 +01:00
Miek Gieben
37f4827e1c Try to group the dependabot prs
Signed-off-by: Miek Gieben <miek@miek.nl>
2025-02-24 15:20:36 +01:00
dependabot[bot]
75e8f27ccd
Bump golang.org/x/sync from 0.7.0 to 0.11.0 (#1635)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.7.0 to 0.11.0.
- [Commits](https://github.com/golang/sync/compare/v0.7.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 15:14:14 +01:00
Miek Gieben
72fe95ac97
SVCB is no RFC 9460. (#1636)
Closes #1628

Signed-off-by: Miek Gieben <miek@miek.nl>
2025-02-22 13:01:06 +01:00
dependabot[bot]
b911878db3
Bump golang.org/x/net from 0.31.0 to 0.34.0 (#1631)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.31.0 to 0.34.0.
- [Commits](https://github.com/golang/net/compare/v0.31.0...v0.34.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-22 12:51:47 +01:00
dependabot[bot]
b5cf0597b8
Bump golang.org/x/sys from 0.27.0 to 0.29.0 (#1632)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.27.0 to 0.29.0.
- [Commits](https://github.com/golang/sys/compare/v0.27.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-22 12:51:33 +01:00
Miek Gieben
97c29ffb8f Release 1.1.63 v1.1.63 2025-01-24 12:05:25 +01:00
dependabot[bot]
c705e5aa58
Bump golang.org/x/sys from 0.23.0 to 0.27.0 (#1619)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.23.0 to 0.27.0.
- [Commits](https://github.com/golang/sys/compare/v0.23.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-24 11:34:30 +01:00
dependabot[bot]
fb0c220a7f
Bump golang.org/x/net from 0.28.0 to 0.31.0 (#1622)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.28.0 to 0.31.0.
- [Commits](https://github.com/golang/net/compare/v0.28.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-24 11:34:03 +01:00
Raymond Nook
ca39c8b728
fix: input validation for RRSIG.Verify() (#1618)
* fix: input validation for RRSIG.verify()

* fix: use labels.go/equal instead of strings.EqualFold for domain comparison
2025-01-24 11:33:32 +01:00
Phillip Stephens
8a00a2f968
add zdns as a user of miekg/dns (#1608) 2025-01-24 11:28:10 +01:00
Erik Geiser
cbe4275da1
Allow SO_REUSEADDR and SO_REUSEPORT to be set simultaneously (#1623) 2025-01-24 11:27:49 +01:00
dependabot[bot]
b77d1ed8e9
Bump golang.org/x/net from 0.27.0 to 0.28.0 (#1600)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.27.0 to 0.28.0.
- [Commits](https://github.com/golang/net/compare/v0.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-09 17:16:11 +02:00
Miek Gieben
794abd7eb8
edns0 cleanups (#1595)
Mostly trickered by:

~~~
-               return &EDNS0_ESU{Code: EDNS0ESU}
+               return new(EDNS0_ESU)
~~~

dont see why this 'case' needs to be different than all the others. Some
various textual changes for the test.

Signed-off-by: Miek Gieben <miek@miek.nl>
2024-08-21 13:01:04 +02:00
Johan Brandhorst-Satzkorn
60089295f7
add decorate reader warning (#1596)
The bytes read from the reader are returned to a pool and
must not be changed by the decorated reader.
2024-08-21 13:00:37 +02:00
Miek Gieben
07a2352e44 Release 1.1.62 v1.1.62 2024-08-13 20:55:19 +02:00
Miek Gieben
34b3cbb003 Go 1.23 was released couple of hours ago
Signed-off-by: Miek Gieben <miek@miek.nl>
2024-08-13 20:51:26 +02:00
Miek Gieben
39938e9c41
Revert "Remove use of deprecated net.Error.Temporary (#1589)" (#1594)
This reverts commit ef7392e4ff2ef86bea51ee4f32fc60eaf1c2a88a.

See:
https://github.com/miekg/dns/pull/1589#issuecomment-2276738695

breaks udp serving
2024-08-13 20:39:49 +02:00
Miek Gieben
ef7392e4ff
Remove use of deprecated net.Error.Temporary (#1589)
net.Error.Temporary has been deprecated since Go 1.18. There
has been some discussion around what to use in server accept loops
instead [1], but the suggestion seems to be that it may be a mistake
to have any sort of retries in place [2].

This PR removes it, which may expose some users to errors that were
previously swallowed and retried, but at the expense of leaking file
descriptors and the like.

1: https://groups.google.com/g/golang-nuts/c/-JcZzOkyqYI/m/xwaZzjCgAwAJ?pli=1
2: https://groups.google.com/g/golang-nuts/c/-JcZzOkyqYI/m/vNNiVn_LAwAJ

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2024-08-03 08:07:18 +02:00
Christian Elmerot
ee99288e87
Add support for NXNAME type (#1584)
IANA har allocated the NXNAME meta type to indicate an NSEC/NSEC3 record
signals that the name does not exist (corresponds to NXDOMAIN).
NXNAME is a meta type only for use with NSEC/NSEC3 bitmaps and use is
defined in https://datatracker.ietf.org/doc/draft-ietf-dnsop-compact-denial-of-existence/

Co-authored-by: Christian Elmerot <elmerot@cloudflare.com>
2024-08-03 08:00:16 +02:00
Christian Elmerot
8d05ff7048
Add support for missing Extended DNS Error Codes (EDE) (#1585)
Extended DNS Error (EDE) codes were missing for code points 25-30.
These are documented in:
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#extended-dns-error-codes

Co-authored-by: Christian Elmerot <elmerot@cloudflare.com>
2024-08-03 07:59:34 +02:00
dependabot[bot]
347f250471
Bump golang.org/x/sys from 0.21.0 to 0.22.0 (#1588)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.21.0 to 0.22.0.
- [Commits](https://github.com/golang/sys/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 07:58:40 +02:00
dependabot[bot]
d6940bfa7d
Bump golang.org/x/net from 0.26.0 to 0.27.0 (#1587)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.26.0 to 0.27.0.
- [Commits](https://github.com/golang/net/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-03 07:58:29 +02:00
Infinoid
870b1c1f9b
add rfc3596 to the list (#1577) 2024-06-21 21:43:02 +02:00
Miek Gieben
e5a40bc574 update list of RFCs
Signed-off-by: Miek Gieben <miek@miek.nl>
v1.1.61
2024-06-13 17:51:48 +02:00
Steffen Sassalla
a1ef7a6312
Add RFC 9540 oblivious services via service binding records (#1567) 2024-06-13 17:49:04 +02:00
Miek Gieben
c3301c36d8 These two too
Signed-off-by: Miek Gieben <miek@miek.nl>
v1.1.60
2024-06-13 17:17:07 +02:00
Benjamin M. Schwartz
eada9c9b7c
Add a hook to catch invalid messages (#1568)
* Add a hook to catch invalid messages

Currently there are hooks for reading messages off the wire (DecorateReader),
checking if they comply with policy (MsgAcceptFunc), and generating responses
(Handler).  However, there is no hook that notifies the server when a message is
dropped or rejected due to a syntax error.  That makes it hard to monitor these
packets without repeating the parsing process.

This PR adds a hook for notifications about invalid packets.

* s/InvalidMsg/MsgInvalid/g
2024-06-13 17:15:27 +02:00
Patrik Lundin
2b89f28521
(*Transfer) Out: Increment WaitGroup in example (#1572) 2024-06-13 16:31:48 +02:00
dependabot[bot]
32f0e182ee
Bump golang.org/x/tools from 0.19.0 to 0.22.0 (#1574)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.19.0 to 0.22.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.19.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 16:24:45 +02:00
dependabot[bot]
f89100d6fe
Bump golang.org/x/net from 0.22.0 to 0.25.0 (#1569)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.25.0.
- [Commits](https://github.com/golang/net/compare/v0.22.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 16:14:01 +02:00
dependabot[bot]
d945412a3e
Bump golang.org/x/sys from 0.18.0 to 0.20.0 (#1571)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.18.0 to 0.20.0.
- [Commits](https://github.com/golang/sys/compare/v0.18.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 16:13:45 +02:00
Janik Rabe
76926c7947
Fix possible out-of-bounds read in endingToTxtSlice (#1557)
* Update escapedStringOffset to improve readability

This function was, admittedly, a little difficult to follow. This new
version is slightly more verbose, but, in my opinion, easier to
understand.

* Fix possible out-of-bounds read in endingToTxtSlice caused by escapedStringOffset

If the input had a trailing backslash (normally the start of an escape
sequence) with nothing following it, `escapedStringOffset` would return
the length of the input, plus one (!), as the result index, causing an
out-of-bounds read and panic in `endingToTxtSlice`.

Consistent with, e.g., commit 2230854ba97edcf29ac55a1f274e49cec11bf9bb,
I've decided to make this an error since it definitely indicates that
the string isn't valid.

Credit to OSS-Fuzz -- thank you!
2024-06-13 16:13:25 +02:00
Janik Rabe
e4ef594946
Fix counting of escape sequences when splitting TXT strings (#1540)
`endingToTxtSlice`, used by TXT, SPF and a few other types, parses a
string such as `"hello world"` from an RR's content in a zone file.
These strings are limited to 255 characters, and `endingToTxtSlice`
automatically splits them if they're longer than that. However, it
didn't count the length correctly: escape sequences such as `\\` or
`\123` were counted as multiple characters (2 and 4 respectively in
these examples), but they should only count as one character because
they represent a single byte in wire format (which is where this 255
character limit comes from). This commit fixes that.
v1.1.59
2024-04-17 21:34:40 +02:00
dcarrillo
ba039c8cdd
Add ifconfig.es to the list of users (#1554) 2024-04-17 21:31:46 +02:00
xiaoxiangxianzi
1c6c79615f
chore: fix some comments (#1547)
Signed-off-by: xiaoxiangxianzi <zhaoyizheng@outlook.com>
2024-03-29 19:03:11 +01:00
dependabot[bot]
96cf8ba93a
Bump golang.org/x/tools from 0.17.0 to 0.19.0 (#1551)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.17.0 to 0.19.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.17.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 19:02:18 +01:00