[Unbound-users] Distinguishing client queries vs. internal sub-queries

Stephane LAPIE stephane.lapie at darkbsd.org
Sat Mar 21 01:44:53 UTC 2015


Hello,

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.

Cheers,

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/unbound-users/attachments/20150321/1f8ca3a3/attachment.bin>


More information about the Unbound-users mailing list