From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 20 21:04:05 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EE4A106564A; Mon, 20 Feb 2012 21:04:05 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qw0-f47.google.com (mail-qw0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5558FC0C; Mon, 20 Feb 2012 21:04:04 +0000 (UTC) Received: by qadz30 with SMTP id z30so3950429qad.13 for ; Mon, 20 Feb 2012 13:04:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=cBbPtTy0RZt3QMxtemUdp7EUfTe3AKZsdrtyFwwRPao=; b=OFZlsd1A9HteMpe1hyaj0F146sHuyiYxtuEHJ0OGgUoLKdyvYMn/gtqEzzgPgb58CJ vDH+xhpefpg0ex1xjpEI5cZRU8LnbG3tHlMThNetny6vFji2RwQs21FdUWUhFvx+udxW yVR4Yg6EFs1nSLbwaMzma0oCvMvMsKqaA7qFg= Received: by 10.229.135.131 with SMTP id n3mr14448363qct.101.1329770410374; Mon, 20 Feb 2012 12:40:10 -0800 (PST) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id hi8sm52387249qab.3.2012.02.20.12.40.09 (version=SSLv3 cipher=OTHER); Mon, 20 Feb 2012 12:40:09 -0800 (PST) Date: Mon, 20 Feb 2012 15:39:59 -0500 From: Alexander Kabaev To: Ed Maste Message-ID: <20120220153959.70f57bf4@kan.dyndns.org> In-Reply-To: <20120220200910.GA46212@sandvine.com> References: <20120220200910.GA46212@sandvine.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/JVnoVZ=Ct_9Tz8NV_Qhja.R"; protocol="application/pgp-signature" Cc: freebsd-hackers@freebsd.org Subject: Re: tftpd: avoid logging error for pxeboot option negotiation? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 21:04:05 -0000 --Sig_/JVnoVZ=Ct_9Tz8NV_Qhja.R Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 20 Feb 2012 15:09:10 -0500 Ed Maste wrote: > After upgrading a diskless boot server from FreeBSD 6 to 8 I see an > error message logged each time a diskless client boots: >=20 > Feb 20 00:56:38 TPC-D4-35 tftpd[55229]: Got ERROR packet: TFTP Aborted >=20 > It turns out that the pxeboot client (from Intel) first performs a > TFTP read request with the tsize option to which it receives an > acknowledgement containing the size of the file to be transferred. > Then it sends back an error response to abort the transfer, and sends > the read request again (without the tsize option). >=20 > The sequence of packets is: >=20 > 1. C->S TFTP Read Request, File: pxeboot, Transfer type: octet, > tsize=3D0 2. S->C TFTP Option Acknowledgement, tsize=3D239616 > 3. C->S TFTP Error Code, Code: Not defined, Message: TFTP Aborted > 4. C->S TFTP Read Request, File: pxeboot, Transfer type: octet, > blksize=3D1456 5. S->C TFTP Option Acknowledgement, blksize=3D1456 > 6. C->S TFTP Acknowledgement, Block: 0 > 7. S->C TFTP Data Packet, Block: 1 > ... >=20 > I'd like to avoid logging the error here, for the sake of this pxeboot > client and any other tftp clients that might check options without > actually starting a transfer. Anyone opposed to removing it? (A > proposed patch is at http://people.freebsd.org/~emaste/tftpd.diff). >=20 > -Ed > _______________________________________________ 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. --=20 Alexander Kabaev --Sig_/JVnoVZ=Ct_9Tz8NV_Qhja.R Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFPQq+nQ6z1jMm+XZYRAuBJAJ0TUp++8E9qn+JX++cP0HsEl2rYtgCfVfWm Y6lM0w2P48Ho6eyc9eNR8OY= =xQAM -----END PGP SIGNATURE----- --Sig_/JVnoVZ=Ct_9Tz8NV_Qhja.R--