[Unbound-users] Distinguishing client queries vs. internal sub-queries
thozza at redhat.com
Tue Mar 24 09:45:41 UTC 2015
On 03/21/2015 02:44 AM, Stephane LAPIE wrote:
> I happen to need about the same kind of processing :
> ignore all sub queries and only care about ones emitted by a client,
> and about responses to a client.
> From my own experience,
> the simplest way to tell them apart from inside a module,
> is that a sub query will not have a client IP address.
> On 03/21/2015 12:42 AM, Tomas Hozza wrote:
> > Hello.
> > I'm interested if there is any way to distinguish,
> > from unbound module point of view, if a query that
> > is being passed to the module was generated by some
> > client or generated internally by some other module?
> > From what I know, there is no combination of module
> > ext_state and event, that would identify such situation.
> > The reason I need this is that I would like to create
> > a module that acts ONLY on queries from clients and
> > FINAL responses to such queries.
> > Imagine my module is not the first in the list of modules.
> > New query from client will invoke the module with mod_state_initial
> > and mod_event_pass. If then e.g. validator created a new
> > subquery for e.g. ". DNSKEY IN", the query will be in the
> > end also passed to my module with mod_state_initial and
> > mod_event_pass. However my module don't care about such query.
> > So is there any way in a module to distinguish queries from clients
> > from internally generated sub-queries? If not would it be possible
> > to add such mechanism?
> > Thank you.
> > Regards,
> > --
> > Stephane LAPIE, EPITA SRS, Promo 2005
> > "Even when they have digital readouts, I can't understand them."
> > --MegaTokyo
Thank you for the clue.
It works well.
Software Engineer - EMEA ENG Developer Experience
Red Hat Inc. http://cz.redhat.com
More information about the Unbound-users