On 29/08/2021 14:34, Dominik DL6ER wrote: > Hey Simon, > > I'm sorry for the noise but - because all good things come in threes - I > found a third case that is not covered by my two patches: When the answer > and question types are not the same (commonly seen for ANY queries replied > to with, e.g., A or AAAA answers). > > But maybe you've already found a more elegant way of handling logging. > > Best, > Dominik >
Well, it's not elegant at the moment. I think the best best is to remove logging from cache_insert() entirely and make the callers to cache_insert() responsible. That's basically extract_addresses() and the code in dnssec.c which adds DS and DNSKEY to the cache. The later already does it's own logging (there's code in cache_insert() which takes account of this.) Your mods to extract_addresses() can be simplified if they don't need to avoid the cases logged in cache_insert(). I'll do that later today. There seems to be redundant code in the find_soa() and do_doctor() code path to do with logging too. I'll look at that at well. Cheers, Simon. _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss