]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Overhaul _destination_and_source.
authorBob Halley <halley@dnspython.org>
Tue, 16 Jun 2020 14:57:59 +0000 (07:57 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 16 Jun 2020 14:57:59 +0000 (07:57 -0700)
commit9833924a4d4c58e35242f370539f7e6e1e61a4b9
tree38aa3baab829b1a9e0d5101c962aac250d2bb775
parent23627467aa47205617d13fac09f76f8c8b96400b
Overhaul _destination_and_source.

We now use dns.inet.low_level_address_tuple() for the low-level tuple
conversion.

We now detect mismatches between source and destination address families.

If a source_port has been specified but we have no idea about the
family, complain.  (This can only happen when 'where' is a URL and no
source address has been specified either.)

'where' MUST be an address literal unless being called by DoH code, but we
tolerated failures in other cases.

In the DoH case where 'where' was a URL and source was specified, the
lack of an address family in the destination caused us to return None
for the source, and thus not set it even though the caller asked for it.
We now infer the address family from the source address in that case.
dns/query.py