Bob Halley [Sat, 14 Dec 2024 19:26:17 +0000 (11:26 -0800)]
Move creating a socket for a DoH query into the address's try..except
block so if creating fails, e.g. due to no IPv6, we try other addressess
if we've got any. [#1169]
Brian Wellington [Fri, 29 Nov 2024 20:23:24 +0000 (12:23 -0800)]
Support registering new types with classes. (#1167)
* Support registering new types with classes.
Previously, dns.rdata.register_type() required passing a module which
contained the implementation of the new type, and it would extract the
class from the module. This change allows passing the class directly.
dependabot[bot] [Sun, 17 Nov 2024 01:44:38 +0000 (17:44 -0800)]
Bump sphinx-rtd-theme from 3.0.1 to 3.0.2 (#1164)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 3.0.1 to 3.0.2.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/3.0.1...3.0.2)
Ryan Frantz [Fri, 18 Oct 2024 17:16:44 +0000 (13:16 -0400)]
Minor README updates (#1149)
- Consistently formats the `dnspython` name and some terminal commands.
- Tightens up a few lines to adhere what I presume is the preferred
80-character line limit.
Brian Wellington [Fri, 18 Oct 2024 16:36:02 +0000 (09:36 -0700)]
Fix AXFR-style IXFR with multiple messages. (#1151)
The inbound xfr code is conflating the expected rdtype in responses with
the incremental/replacement response style. This causes a problem when
an AXFR-style IXFR response spans multiple messages, as resetting the
style to AXFR (replacement) also changed the expected type in the
question section of future responses to AXFR.
This change separates out the style from the expected rdtype.
Brian Wellington [Fri, 11 Oct 2024 20:34:57 +0000 (13:34 -0700)]
Add dns.edns.Option.to_generic() (#1145)
* Add dns.edns.Option.to_generic()
Converts an EDNS option represented by a custom class into an equivalent
option represented by the generic option class. This is similar to the
existing dns.rdata.Rdata.to_generic() method.
Also, adds a specialization to the existing dns.rdata.Rdata.to_generic()
method for GenericRdata, to avoid extra work for applications that want
to convert all rdata to generic form.
dependabot[bot] [Wed, 9 Oct 2024 16:47:28 +0000 (09:47 -0700)]
Bump sphinx-rtd-theme from 3.0.0 to 3.0.1 (#1144)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 3.0.0 to 3.0.1.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/3.0.0...3.0.1)
dependabot[bot] [Tue, 8 Oct 2024 15:22:35 +0000 (08:22 -0700)]
Bump sphinx-rtd-theme from 2.0.0 to 3.0.0 (#1142)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 2.0.0 to 3.0.0.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/2.0.0...3.0.0)
Bob Halley [Tue, 17 Sep 2024 12:56:14 +0000 (05:56 -0700)]
Add a copy mode to dns.message.make_response(). (#1131)
Add a copy mode to dns.message.make_response().
If the mode is none, then a default copy mode appropriate for the opcode will
be used. This is currently always dns.message.CopyMode.QUESTION.
If the mode is dns.message.CopyMode.QUESTION then only the question
section is copied.
If the mode is dns.message.CopyMode.EVERYTHING, then all sections are
copied other than OPT or TSIG records which are created appropriately
if needed instead of being copied.
If the mode is dns.message.CopyMode.NOTHING then no sections are
copied.
Bob Halley [Sat, 14 Sep 2024 15:51:39 +0000 (08:51 -0700)]
Check SAN for IP if using an address URL in https() [#1125].
Httpx needs us to set the "sni_hostname" extension if the
server in the URL is an IP address, as otherwise it will not
check the certificate. With this change, it will look for a
SAN with the IP address.
Brian Wellington [Sun, 18 Aug 2024 13:54:16 +0000 (06:54 -0700)]
Refactor xfr. (#1122)
* Refactor xfr.
Internally refactors the zone transfer code to separate the message
processing from the socket management, allowing the (internal) callers
to pass a socket in. This should allow a future interface that accepts
a socket, which would mean that xfr over DoT would just work, and xfr
over DoQ would be closer to working.
Adds some necessary functionality to the asyncbackend Socket class to
allow the async zone transfer code to be more similar to the sync code
(specifically, adds a type field to Socket, and updates the trio backend
to connect UDP sockets when requested).
In asyncquery.py, reorder the inbound_xfr() and quic() methods for
consistency.
Bob Halley [Wed, 31 Jul 2024 12:27:48 +0000 (05:27 -0700)]
Deal with windows registry delimiters more comprehensively. (#1113)
Windows has used both " " and "," as a list item delimiter, and
issues [#1010] and [#1112] have also show that both can happen,
possibly due to updates, e.g. "a, b". We now just convert "," to
" " and split().
Bob Halley [Tue, 9 Jul 2024 14:11:42 +0000 (07:11 -0700)]
Fix the have_quic computation for test_doq
The have_quic determination broke when we switched to the
improved nanonameserver, and if aioquic was not installed then
the test_doq tests would fail instead of being skipped. We now
skip again in this situation.
Bob Halley [Mon, 25 Mar 2024 19:44:36 +0000 (12:44 -0700)]
Properly fix asyncio QUIC shutdown races [#1069].
There were two basic issues:
1) We did not wake up the sender thread to do work in some cases, and could
sleep for a long time.
2) asyncio.wait_for() does not instantly run the function, it just schedules
it, and our guards against lost wakeups were thus in the wrong place.