Commit Graph

348 Commits

Author SHA1 Message Date
XOR-op
03af149076 fix clippy and compile errors 2023-03-04 11:03:13 -08:00
XOR-op
22beac02ce test: fix OnSend 2023-03-04 11:03:13 -08:00
XOR-op
63a1f7692e test: fix compile errors 2023-03-04 11:03:13 -08:00
Benjamin Fry
b34dfff95c fix formatting for inline variables 2023-02-06 09:25:04 -08:00
Dirkjan Ochtman
532dca3bd9 Move client code used by server code down into proto 2023-02-06 09:25:04 -08:00
Daniel McCarney
e5075c6059 tests: add file authority test for default IN.
This commit adds a new test and testcase to the server crate test suite.
The `test_implicit_in_class` unit tests reads the
`tests/test-data/named_test_configs/default/implicitclass.zone` zone file
and asserts no error occurs. This zone file does not specify an explicit
record class, ensuring that the file authority defaults to IN, the
internet class.
2023-01-17 09:07:28 -08:00
Daniel McCarney
3235d2b3f6 tests: named_test_configs -> test_configs 2023-01-10 16:35:21 -08:00
Mattias Päivärinta
0b8d462ba0 Replace impl From<Message> for DnsResponse with DnsResponse::from_message() 2023-01-05 13:42:12 -08:00
Jeff Hiner
30aed7abc2 Don't retry NOERROR with an empty set, from trusted resolvers 2022-12-21 22:52:05 +01:00
HLFH
ee45c2b970 make homepage link simpler for end users 2022-12-20 14:08:09 -08:00
HLFH
98fd773a08 fix DNSSec typo > DNSSEC 2022-12-20 15:22:05 +01:00
HLFH
9301df2032 fix DNSSEC typo 2022-12-20 15:22:05 +01:00
Axel Viala
0b69fb0527 WIP: Fix $TTL not taken into account with wildcard from zonefile. 2022-12-04 15:49:42 -08:00
Dominic
0808636d92 Replace http: links with https: 2022-11-29 11:29:24 -08:00
HLFH
b122d71636 OpenSSL 3.0 compliant 2022-11-28 13:25:38 -08:00
David Bürgin
ccd875bce4 Declare rust-version in Cargo.toml 2022-11-03 15:34:46 -07:00
Nate Hurley
a88a7a575a Fix some spelling errors 2022-10-03 10:24:03 +02:00
Steve Singer
4eb2140e60 Ran gen-keys.sh to regenerate example certificates 2022-09-27 09:46:41 -07:00
Steve Singer
b1e7e92016 Regenerate the test SSL certificates 2022-09-27 09:46:41 -07:00
Benjamin Fry
379469a979 prepare 0.22.0 release 2022-09-02 12:21:49 +02:00
Benjamin Fry
654fc5183d rename hints to roots in source and docs 2022-08-24 15:20:43 -07:00
Benjamin Fry
11cc91a17e initial set of tests for the recursor 2022-08-24 15:20:43 -07:00
Benjamin Fry
457bd36130 add recursor to server 2022-08-24 15:20:43 -07:00
Benjamin Fry
4ceec91e0a add initial RecursiveAuthority 2022-08-24 15:20:43 -07:00
Benjamin Fry
28ffe0e8b6 initial layout of recursor 2022-08-24 15:20:43 -07:00
Nate Hurley
52e2a21a17 Rename the ServerOrderingStrategy variants. 2022-08-24 12:03:56 -07:00
Nate Hurley
cfcf86230f Add option to use a provided name server order.
This corresponds to the "on/off" switch discussed in #1702. A later pull
request will make improvements to the "Default" strategy.
2022-08-24 12:03:56 -07:00
Dirkjan Ochtman
ca000eaaf9 Update dependencies 2022-08-03 07:11:22 -07:00
dependabot[bot]
32df013911 Bump rusqlite from 0.27.0 to 0.28.0
Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.27.0 to 0.28.0.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 11:25:48 +02:00
Benjamin Fry
03d10d312d cleanup transition to tracing 2022-05-09 10:33:19 -07:00
Erik Hollensbe
77a821f52b Move log to tracing package
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-05-09 10:33:19 -07:00
Evan Cameron
eb58c66eda deprecate edns methods, add extensions 2022-04-08 13:41:13 -07:00
Evan Cameron
501f12d796 fix tests for edns_mut change 2022-04-08 13:41:13 -07:00
Benjamin Fry
45898ed4d6 initial trust-dns server config integration 2022-04-07 13:23:18 -07:00
Benjamin Fry
0413acf912 QuicStream impl working 2022-04-07 13:23:18 -07:00
Benjamin Fry
f91b45f410 prepare 0.21.2 for release 2022-03-30 10:53:42 -07:00
Benjamin Fry
9a70ddb32e fix time txt parsing in SOA records 2022-03-08 11:56:04 +01:00
dependabot[bot]
8515a4321f Bump rusqlite from 0.26.2 to 0.27.0
Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.26.2 to 0.27.0.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.26.2...v0.27.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 21:41:29 +01:00
Benjamin Fry
7e4f9b2661 prepare 0.21.1 release 2022-02-27 20:00:03 -08:00
Benjamin Fry
cca5155317 prepare 0.21.0 for release 2022-02-26 05:07:30 -08:00
kmkaplan
13998d5ef0
Parse DS records (#1635)
* trust_dns_client::serialize::txt::parse_rdata::RData::parse(): support parsing DS

* add a DS in the example.com test zone file

* fix client::serialize::txt::Parser::parse_time() to require a number before any unit symbol (smhdw)

This is required to prevent the parser from interpreting a DS record type as a TTL of 0 seconds.

* fix clippy "use of `ok_or` followed by a function call"

* Only compile DNSSEC capabilities if feature dnssec is specified

* Add some knowledge about more DNSSEC algorithms from the RFC: RSAMD5, DSA and
digest type GOSTR34_11_94

* Fix typo: it's DS, not CDS.

Introduced in commit 87fd9b32c44b7adbd0e46091d0975234b48c3fde

* Fix cleanliness: apply cargo-fmt

* Fix tests without features DNSSEC.

* Fix store::file::authority::tests::test_load_zone with --all-features

* Fix cargo fmt -- --check

Co-authored-by: Kim Minh Kaplan <kimminh.kaplan+git@afnic.fr>
2022-02-18 10:31:25 -08:00
Benjamin Fry
3becddb54b prepare 0.21.0-alpha.5 2022-02-08 13:52:20 +01:00
Benjamin Fry
aaf726e556 add test for partial truncation response 2022-02-07 21:42:38 -08:00
Benjamin Fry
f79fd6b584 fix truncation test 2022-02-07 21:42:38 -08:00
Benjamin Fry
b296e3d47d remove deprecated uses of Record::rdata 2022-02-08 00:58:14 +01:00
Benjamin Fry
0ac5d416a1 Do not use NULL rdata with ZERO rtype 2022-02-08 00:58:14 +01:00
Benjamin Fry
22ffc3fd2a pass RequestInfo into Authority on search 2022-02-05 19:06:37 -08:00
David Bürgin
2434cd27a8 Fix minimal dependency versions 2022-02-03 14:31:01 +01:00
Dirkjan Ochtman
d7aa80fc30 server: keep MessageResponse iterators generic 2022-01-19 07:48:35 +01:00
Sebastian Urban
6ef9b4ec4a Configuration of bind address for resolver.
Allows configuration of the local address that is used by the resolver.
This is useful if the system has multiple active network connections
and it is desirable to specify which interface is used for name
resolution.
2022-01-04 14:57:50 -08:00
Benjamin Fry
d04a41b1fa make past and future checks on check no-default-features 2021-12-11 12:03:53 -08:00
Peter Johnston
a8842545fc Do not retry the same name server on a negative response 2021-11-23 18:26:50 -08:00
Emīls
efcd907839 Remove unused field on NameServerPool 2021-11-04 13:03:49 -07:00
Benjamin Fry
773963288a fix formatting of server_future_tests.rs 2021-10-30 10:18:32 -07:00
Dirkjan Ochtman
57d0c8c0fb Update to rustls 0.20 2021-10-30 10:18:32 -07:00
Benjamin Fry
fa59fe50ab prefer std::time::Duration 2021-10-27 21:02:46 -07:00
Benjamin Fry
7b2e1eb235 Remove Chrono dependency 2021-10-27 21:02:46 -07:00
Benjamin Fry
63fdb84333 prepare 0.21.0.alpha.4 2021-10-13 16:08:14 -07:00
dependabot[bot]
f9afed813c Bump rusqlite from 0.25.3 to 0.26.0
Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.25.3 to 0.26.0.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.25.3...v0.26.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 16:01:59 +02:00
Peter Johnston
aefb6deded Default to only switch to TCP if response was truncated
Currently, if queries to name servers over UDP result in either a
truncated response, or any kind of error, the query will be retried over
TCP. It should be possible to only use TCP for the case of oversized
messages, and avoid it in the common case. This change makes this the
default behavior and adds an option to ResolverOpts that can be enabled
to get the current behavior.
2021-10-08 09:46:55 -07:00
Benjamin Fry
cb73fd9cc9 pass Request by reference to RequestHandler 2021-10-07 12:24:03 -07:00
Benjamin Fry
c500ca2639 fix SyncClient::send and add FormErr test 2021-10-07 12:24:03 -07:00
Benjamin Fry
b62d2382e0 cleanup request handling by enforcing single query during parsing 2021-10-07 12:24:03 -07:00
Benjamin Fry
fc3eafd100 simplify request handling by verifying query form 2021-10-07 12:24:03 -07:00
Benjamin Fry
1ab4baf044 cleanup use statements 2021-10-07 12:24:03 -07:00
Benjamin Fry
af7b3dfe7e update cangelog for server request logging 2021-10-07 12:24:03 -07:00
Benjamin Fry
d9dcd8bfb0 Simplify server logging to single logline per request 2021-10-07 12:24:03 -07:00
Benjamin Fry
837f65057e prepare 0.21.0-alpha.3 2021-09-28 08:47:26 -07:00
Peter Johnston
227105a797 Correct behavior around trust_nx_responses
In 1b524afd86a7ba273d23efa393dc4e68c446d8e9, which moved the
`trust_nx_responses` setting from a configuration on the resolver to a
configuration at the name server level, the option was also renamed from
`distrust_nx_responses`. There were some places in the codebase where
the corresponding boolean value was not also flipped, unintentionally
changing the semantics. This has led to some confusing behavior. For
example, in the `test_trust_nx_responses_fails_servfail` test, where
`distrust_nx_responses` was previously set to `false`,
`trust_nx_responses` was left as `false` in the change, where it should
have been changed to `true`.

This change fixes a bug where retry behavior doesn't occur unless
`trust_nx_responses` is set to `true` (due to an error response not
being considered a `ResolveError`), and reworks the tests to accurately
test the current behavior. It also consolidates the
`test_distrust_nx_responses` and `test_retry_on_error_response` tests
into one test, as they exercised the same functionality.
2021-09-23 10:12:02 +02:00
Benjamin Fry
f7465c9917 require Authority to have interior mutability 2021-09-20 12:05:58 -07:00
Benjamin Fry
b8ad0d68ca Move to async-trait for server to simplify function calls 2021-09-20 12:05:58 -07:00
Benjamin Fry
909d5b7a6c update certs for tests 08-2021 2021-09-13 19:14:46 -07:00
Benjamin Fry
057735a1dc prepare 0.21.0-alpha.2 2021-08-29 17:20:38 -07:00
Benjamin Fry
217e1d579e tests for non-authoritative answers 2021-08-22 10:30:31 -07:00
Benjamin Fry
aebc682dfa stop returning NS records on authoritative response 2021-08-22 10:30:31 -07:00
Peter Johnston
f08860cf8c return error response from highest priority name server 2021-08-04 15:33:37 -07:00
Peter Johnston
1e662930d5 retry on all DNS error response codes 2021-08-04 15:33:37 -07:00
Benjamin Fry
236f98bdc4 remove unnecessary borrows 2021-08-02 10:34:53 +02:00
dependabot[bot]
705524af26 Bump env_logger from 0.8.3 to 0.9.0
Bumps [env_logger](https://github.com/env-logger-rs/env_logger) from 0.8.3 to 0.9.0.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.3...v0.9.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-19 16:14:24 +02:00
Peter Johnston
0d27876b6d add integration test 2021-07-04 11:17:51 -07:00
Benjamin Fry
d9424717ee introduce DnssecAuthority to allow disabling of dnssec in authority 2021-06-30 06:55:11 -07:00
Benjamin Fry
0cc7874201 move all DNSSECRecordType variants into RecordType 2021-06-30 06:55:11 -07:00
Benjamin Fry
59d6343862 move all DNSSECRecordType variants into RecordType 2021-06-30 06:55:11 -07:00
Benjamin Fry
8eca711b9a add cleanliness target and better clippy coverage 2021-06-30 11:25:33 +02:00
Benjamin Fry
57b131f7dc fix clippy warnings for Rust 1.53 2021-06-19 07:51:09 +02:00
Benjamin Fry
eb46623d30 remove all deprecated usages of Signer for SigSigner 2021-05-30 14:57:51 -07:00
Benjamin Fry
b01c52760b rename Signer to SigSigner to differentiate from TSigner 2021-05-30 14:57:51 -07:00
Benjamin Fry
f025b16b45 move TSIG into DNSSEC to allow for slimmer dependencies 2021-05-30 14:57:51 -07:00
Trinity Pointard
1ce2311aa3 fix following review 2021-05-26 12:24:33 -07:00
Trinity Pointard
a14b07b382 add test for tsigned zone transfer
and fix errors it uncovere
2021-05-26 12:24:33 -07:00
Trinity Pointard
13c4c78685 fix zone transfer test 2021-05-26 12:24:33 -07:00
Trinity Pointard
5aa672f4fc try to add tsig test against bind 2021-05-26 12:24:33 -07:00
Trinity Pointard
5a2982e206 add tests and doc-comments
also implement signature verification in proto
answers are not automatically verified however
2021-05-26 12:24:33 -07:00
Trinity Pointard
5bcee8b817 fix https and mdns clients and tests 2021-05-26 12:24:33 -07:00
Trinity Pointard
adb057a4bd Add support for TSIG to client
/!\ Contains breaking changes, some prototypes were changed from a Sig0 Signer to an enum type containing either Sig0 or TSIG signer
Changes were tested against KnotDns, however unit/integration tests are still missing
The client does not authenticate server answer as it should per RFC8945 5.3.1.
Could use more comments
2021-05-26 12:24:33 -07:00
dependabot-preview[bot]
4a27c8d9af Bump rusqlite from 0.24.2 to 0.25.3
Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.24.2 to 0.25.3.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.24.2...v0.25.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-05-22 11:31:59 -07:00
Benjamin Fry
00f1bc0aeb setup versions for 0.21.0-alpha.1 2021-05-22 10:34:53 -07:00
Benjamin Fry
65846ee1c7 Prepare 0.20.3 with Windows build fix 2021-05-22 10:34:53 -07:00
Trinity Pointard
5cb10a0131 fix clippy 2021-05-22 10:25:49 -07:00
Trinity Pointard
280ed30f1a re-add IXFR test 2021-05-22 10:25:49 -07:00