]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Add support for receiving UDP queries.
authorBrian Wellington <bwelling@xbill.org>
Wed, 8 Jul 2020 22:11:19 +0000 (15:11 -0700)
committerBrian Wellington <bwelling@xbill.org>
Wed, 8 Jul 2020 22:15:31 +0000 (15:15 -0700)
commit7a5e59707b395454db2cb650371bbc2e800e7be4
treebc49dbae99179d3afee50e6e25f9ecb80800adc7
parentcce293110167a2e8e20fdf6cdf2d15b0b9ca6679
Add support for receiving UDP queries.

The existing receive_udp() methods are only usable for receiving
responses, as they require an expected destination and check that the
message is from that destination.

This change makes the expected destination (and hence the check)
optional, and returns the address that the message was received from (in
the sync case, this is only done if no destination is provided, for
backwards compatibility).

New tests are added, which required adding generic getsockname() support
to the async backends.
dns/_asyncio_backend.py
dns/_curio_backend.py
dns/_trio_backend.py
dns/asyncquery.py
dns/query.py
tests/test_async.py
tests/test_query.py