[Dnsmasq-discuss] file not found messages from tftp
Geert Stappers
stappers at stappers.nl
Wed Jul 7 11:20:23 UTC 2021
On Tue, Jul 06, 2021 at 11:01:53PM +0200, Aleksander Mazur wrote:
> Hi,
Hello,
> PXE boot works great with the support of dnsmasq, however I find many
> error messages in syslog saying that TFTP client tried to download some
> file which didn't exist (names are generated from MAC address and IP).
> Since this is actually expected and there is nothing to worry about,
True
> may I suggest changing
> log level from LOG_ERR to LOG_DEBUG in case of ERR_FNF?
> --- a/src/tftp.c
> +++ b/src/tftp.c
> @@ -703,7 +703,7 @@
> len = snprintf(mess->message, MAXMESSAGE, message, file, errstr);
> ret += (len < MAXMESSAGE) ? len + 1 : MAXMESSAGE; /* include terminating zero */
>
> - my_syslog(MS_TFTP | LOG_ERR, "%s", mess->message);
> + my_syslog(MS_TFTP | (err == ERR_FNF ? LOG_DEBUG : LOG_ERR), "%s", mess->message);
>
> return ret;
> }
It feels wrong to **hide** valid TFTP requests under DEBUG logging.
Groeten
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list