[Unbound-users] python module example documentation bug and crasher
W.C.A. Wijngaards
wouter at nlnetlabs.nl
Mon Jan 20 09:07:42 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Paul.
On 01/19/2014 08:04 AM, Paul Wouters wrote:
>
> I looked at:
>
> http://www.unbound.net/documentation/pythonmod/examples/example0.html#complete-source-code
>
>
>
> When loading that module, unbound always SERVFAIL's. Thinking that
> this section was wrongly returning MODULE_ERROR:
>
> if event == MODULE_EVENT_PASS: log_info("pythonmod: event_pass")
> qstate.ext_state[id] = MODULE_ERROR return True
>
> I changed it to MODULE_FINISHED. However, that lead to a crash in
> unbound:
You are violating the api contract for modules, if the rcode is
noerror then there must be a valid dns_msg (with content). Otherwise,
the rcode is all there is. If you want an rcode with more data, set
the outer rcode to noerror and the dns-msg rcode to the rcode you want
and the rest of the dns-msg with all the data.
Best regards, Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJS3OdeAAoJEJ9vHC1+BF+NAxYQAIzRKoy4bIdVLILMNFjt4SXE
c4SMPIyQ8fBqBUpuklpo8BNSEt3Q48AUY4soQZjpVk1iK0sLcab43MS0M+s8RJCy
s3K91fWnPlQLjoDlHk1WeTQ7vZcsRQWA++QbNYG+vI5h85/fqAD5e7hPlAVS/wL4
/fh4UFQoFHJmTvxDAbu2LBMx95EmnjgAzj7cSM5u1v++3M06UlF8xOtsgVeZ7HkX
QBF6ZhUeKo/nhB99QpSMNZtfOfpKrzigwryLdOtDOakjqLVvqM2nXAylRJwaIFUe
2Hrcjclhpt61VdBEGDOQKgbyluzpisZrOeQcHDl+sy1rqlbku94Fv7r1dodTidIc
VKv1fux9u1Bv0I3btp2dfXoYAoov02hiIzRACcfpjApluXTiN+4/XYuTP812YuZg
xMdOq1eZ0FvIxrvun4fcFl0trxpWmCmyPnXNWaQuGiSjJdEJVlxpZRwupwr/f9+b
o0AvlVbl1u6N91OwbBSiTWn3VboschumO6lYw9wa119OSSvvTriHSRwRiCBP4y8J
u0yj6rlF9rFiFyMuQv93BAGLZKys3uHK0uBYxtv/4KQCzfPBwabYkq9GfRWfXYYt
Upvs7VtkPzis5l7gU3d4senlPr034/5OzqxwGjlCTHKF3ndbZgfhL4Ut8sUSF2HF
QKK1YTTt7Z13nqPckypb
=GGfV
-----END PGP SIGNATURE-----
More information about the Unbound-users
mailing list