mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Log format error from upstream as 'FORMERR'
Signed-off-by: Rob Gill <rrobgill@protonmail.com> At the moment if a misformatted query is reported by the upstream server it is not clear from the log. Other error codes from RFC1035 (server failure, not implemented, refused) are logged with text, but format error is logged merely as "1". Such that an upstream reporting a format error is presently logged as eg: Apr 20 12:01:55 dnsmasq[3023]: reply error is 1 After this patch they are logged informatively, eg: Apr 20 12:48:40 dnsmasq[3023]: reply error is FORMERR This is a two line fix, FORMERR is already defined in dns-protocol.h.
This commit is contained in:
@@ -2222,6 +2222,8 @@ void log_query(unsigned int flags, char *name, union all_addr *addr, char *arg,
|
||||
dest = "SERVFAIL";
|
||||
else if (rcode == REFUSED)
|
||||
dest = "REFUSED";
|
||||
else if (rcode == FORMERR)
|
||||
dest = "FORMERR";
|
||||
else if (rcode == NOTIMP)
|
||||
dest = "not implemented";
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user