[Dnsmasq-discuss] [PATCH 0/1] Allow configuring filter-A/AAAA via dbus

Clayton Craft clayton at craftyguy.net
Tue Jan 24 07:21:45 UTC 2023


On Mon, 23 Jan 2023 14:06:56 -0800 Clayton Craft <clayton at craftyguy.net> wrote:
> There doesn't appear to be a way to change the filter-A or filter-AAAA
> parameters at runtime, after the config is loaded / cmdline params are parsed.
> In some cases[1], I want to conditionally enable/disabling these options at
> runtime. Is this patch to make this configurable via dbus acceptable? Or is
> there some other way to achieve this using dnsmasq that I've missed?

So... this doesn't quite work correctly: if a type (e.g. AAAA) is not being
filtered, then I call SetFilterAAAA with 'true', AAAA records still show up in
the reply because I think(?) it's a cached response. If I call SetFilterAAAA
with 'true' then call ClearCache, then AAAA records are removed from the reply
as I'd expect.

I spent some time trying to figure out when/where a reply is set to a cache hit,
thinking that maybe the rrfilter() calls in forward.c:process_reply for
RRFILTER_A and RRFILTER_AAAA might need to happen after a cache hit, but I
wasn't able to figure it out yet... Any pointers would be appreciated!

-Clayton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20230123/60760d45/attachment.sig>


More information about the Dnsmasq-discuss mailing list