gera2ld / async_dns

DNS library based on asyncio
MIT License
70 stars 17 forks source link

ProxyResolver hides the "truncated" flag #29

Open JirkaV opened 1 year ago

JirkaV commented 1 year ago

I was chasing down an issue where some DNS responses were empty when using async_dns. This turned out to be a problem with too large responses for UDP and I realized I need to switch to TCP for these queries. This is totally fine and should be my responsibility, the problem is that the .tc attribute signalling that response is truncated and new query needs to be sent over TCP is lost.

It'd seem that the problem is in the _query method of ProxyResolver which does nothing to propagate the .tc flag from the actual DNS server response to the final response.

I'd send a pull request but don't feel like I know DNS well enough to be confident about my own fix :)

Also - thank you for providing such useful library!