To diagnose some failures, I'd like the server to log the address from which the DNS queries are coming.
I think I'll need to subclass DNSServerFactory and override handleQuery. This method is given an address parameter (although only for UDP requests), but it does not pass it through to self.resolver.query (because normally the response should not depend upon who is asking).
Or maybe override gotResolverResponse and gotResolverError, which are given both the response/failure and the client address.
To diagnose some failures, I'd like the server to log the address from which the DNS queries are coming.
I think I'll need to subclass
DNSServerFactory
and overridehandleQuery
. This method is given anaddress
parameter (although only for UDP requests), but it does not pass it through toself.resolver.query
(because normally the response should not depend upon who is asking).Or maybe override
gotResolverResponse
andgotResolverError
, which are given both the response/failure and the client address.