Maintained by: NLnet Labs

[Unbound-users] performing dns lookups inside python module?

W.C.A. Wijngaards
Tue Oct 30 09:05:54 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On 10/29/2012 06:20 PM, Paul Wouters wrote:
> On Mon, 29 Oct 2012, Brian wrote:
> 
>> There is also the dnspython module.
> 
> The issue is I am capturing unbound queries, hack some work, then 
> let them pass through. I'm modifying the resolver behaviour.

It should technically be possible to do two kinds of lookups: direct
dns queries to a server IP address, and you can spawn recursion, a
query that receives full validation and resolution from unbound.
These simply involve calling some function callback from the module
environment and then exit from processing this event.  When the lookup
is done the python module is triggered again with an event.  Because
you exited the processing of this event, unbound should not block or
deadlock.

Best regards,
   Wouter

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQj4pdAAoJEJ9vHC1+BF+No60P/Ao2C7yUCeXA34RX37t26eEh
9enrU7K06vi7yWd1oMwentkVjMOidnQBbxlr9RAaSZdZ2qj7KKFX49XMbies5vVr
pQAxHfN5FuZBaSKNPjUZuB02s3EmzAZRm1CtwBpF9AM396eQ0RuOiYHWk2/MPrJY
fLhahP0BXJR9xDqXGnyBKM18A5rDEDoyuXTMtVDtlw8aeEEvpYfuJV7OpE2eqTNB
TmxkhTJ6qbiy1tSQgQhAjb0MWsLygG9exLhb18odyReaw3XZhukFJ1SaRthwXNW+
iZyXAfPNOpZBcARbsubcTbQ1uUc59zwN8ClHd/0Kz7c1uAa1JN6EpNNEaDlnM0Og
DE61GKdilulkma9o7f2ro/JS3H1kW8ZZWfKQS58SQuhQPypr3gBjN/JDAW8zGm53
ahT+WEevctOW+bIrwD+jQVIPIFgBj/iq2A7baDQwQPQKaLSd7AVMxPbASTrddv/z
oWQlQJ/G4HoRogeavIXd0E/+CpnPCxqPFtZmfkVi9SY8GdWCQrgcci9Mq5dB/861
92qssVsGMGlu3V5UFUyw5zrs3oTQSMtB3eI01MFbxI3dbfy8C5fjvjVRcPVK1557
zfuqbGRQ6AowMtN5vKqjIvgPeO5EjrlOXc53Bq6mnLvdFxnFa9jBlMOh/yjbm4ho
Pkb1G8gC5ChM9ZXsJHcO
=KHkM
-----END PGP SIGNATURE-----