[Unbound-users] which module inform_super callback was called in when the execution path is mesh_make_new_space()->mesh_walk_super()?
Yang Zhe
yangzhe1990 at gmail.com
Mon Oct 17 12:31:32 UTC 2011
2011/10/17 W.C.A. Wijngaards <wouter at nlnetlabs.nl>:
> So, for the people on the bench here, this is about the internal modules
> that unbound uses to resolve queries. They are event driven. The
> inform_supers event happens if a sub-query is done. For example, the
> DNSKEY for a trust anchor has been looked up and the query can continue
> its validation.
>
> A module creates a subquery, and then waits for that to be done. This
> event is the inform_supers event. It happens for the module that is
> active (i.e. that created the subquery).
>
> The same mechanism is also used for network access. The module creates
> a network-query. An event arrives when that is done, it is sent to the
> active module (i.e. that created the network query and then waited for it).
Hi Wijngaards,
I understand and also read the code of the event-driven model of
unbound. I'm wondering that is it a bug in mesh_walk_supers(), only
the current module's inform_super() function is called. Why not all
the modules' inform_super() are called or only the first module's
inform_super() is called.
While I'm typing I realized that I misread this line of the code of
mesh_walk_supers()
(*mesh->mods.mod[ref->s->s.curmod]->inform_super)(&mstate->s,
ref->s->s.curmod, &ref->s->s);
the inform_super being called is the super states's current module,
not the child's.
Sorry for my carelessness. Thank you for your help. I have the answer now.
--
Sincerely,
Yang Zhe
More information about the Unbound-users
mailing list