Date: Mon, 20 Feb 2012 18:02:04 -0500 From: Ed Maste <emaste@freebsd.org> To: Alexander Kabaev <kabaev@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: tftpd: avoid logging error for pxeboot option negotiation? Message-ID: <20120220230202.GA59361@sandvine.com> In-Reply-To: <20120220153959.70f57bf4@kan.dyndns.org> References: <20120220200910.GA46212@sandvine.com> <20120220153959.70f57bf4@kan.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 20, 2012 at 03:39:59PM -0500, Alexander Kabaev wrote:
> IIRC, PXE sends an error packet with zero error code. Could you supress
> the error message in that case and avoid propagation of the 'ignore
> error' flag?
>
> PXE client is not alone doing that - custom TFTP
> implementation in pxeloader does that as well now, so suppressing errors
> in this case is a good idea.
Thanks for the suggestion, that makes a much simpler patch:
Index: tftp-io.c
===================================================================
--- tftp-io.c (revision 231851)
+++ tftp-io.c (working copy)
@@ -463,7 +463,8 @@
}
if (pkt->th_opcode == ERROR) {
- tftp_log(LOG_ERR, "Got ERROR packet: %s", pkt->th_msg);
+ tftp_log(pkt->th_code == EUNDEF ? LOG_DEBUG : LOG_ERR,
+ "Got ERROR packet: %s", pkt->th_msg);
return (RP_ERROR);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120220230202.GA59361>
