From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DLHR6-0003CI-Ek for qemu-devel@nongnu.org; Tue, 12 Apr 2005 05:11:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DLHR2-0003Aj-Li for qemu-devel@nongnu.org; Tue, 12 Apr 2005 05:11:53 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLHR2-0003AR-5D for qemu-devel@nongnu.org; Tue, 12 Apr 2005 05:11:52 -0400 Received: from [64.233.184.194] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DLHsc-0004bm-41 for qemu-devel@nongnu.org; Tue, 12 Apr 2005 05:40:22 -0400 Received: by wproxy.gmail.com with SMTP id 40so80849wri for ; Tue, 12 Apr 2005 02:40:13 -0700 (PDT) Message-ID: Date: Tue, 12 Apr 2005 11:40:13 +0200 From: Magnus Damm Subject: Re: [Qemu-devel] one bug and one suggestion In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Reply-To: Magnus Damm , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Cedric.Roux@eurecom.fr Cedric, All, On 4/11/05, Cedric Roux wrote: > Dear Qemu people, >=20 > there is a bug in slirp/udp.c for tftp handling. > You do: > if (ntohs(uh->uh_dport) =3D=3D TFTP_SERVER) { > tftp_input(m); > goto bad; > } > You don't test if the destination is the emulator > or the outside world. So, if I want to connect to another > computer running a tftp server, qemu will instead take > the hand. > This bug exists while using -user-net. Don't know for > tun/tap, I am not root here. Yes, you are correct what I can tell. I thought that only data for the emulated server went through that path so I copied the BOOTP code, but I now realize that the BOOTP case handles broadcast data. Care to make a patch? > Now, for a suggestion. > There is the -tftp option. It would be a good idea > to add some option like -tftp-relative-names or something > like that so that the client can ask for a file /foo/bar.dummy > and get access to this file under the tftp directory. >=20 > To be clear: you run qemu -tftp /tftp/directory/something > and the client inside qemu asks for /foo/bar.dummy, but > effectively accesses /tftp/directory/something/foo/bar.dummy. > The client does not have to ask for > /tftp/directory/something/foo/bar.dummy > Get the point? > It seems more natural to me. What do you think? I agree it is more natural. But I was lazy and I wanted to keep it simple. And there are several limitations that comes with TFTP such as limited file size, no directory listing and so on so I would like to keep the TFTP server as simple as possible, ie read only. I hope that someone will hack together a webdav or FTP server that makes it easy to transfer files for normal users too. Thanks, / magnus