Add --log-queries=auth option.

This commit is contained in:
Simon Kelley
2025-04-20 22:20:52 +01:00
parent 95b74a7acf
commit e3a2c8dadf
6 changed files with 34 additions and 25 deletions

View File

@@ -2184,6 +2184,10 @@ void log_query(unsigned int flags, char *name, union all_addr *addr, char *arg,
if (!option_bool(OPT_LOG))
return;
/* F_NOERR is reused here to indicate logs arrising from auth queries */
if (!(flags & F_NOERR) && option_bool(OPT_AUTH_LOG))
return;
/* build query type string if requested */
if (!(flags & (F_SERVER | F_IPSET)) && type > 0)
arg = querystr(arg, type);