[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] one bug and one suggestion
From: |
Magnus Damm |
Subject: |
Re: [Qemu-devel] one bug and one suggestion |
Date: |
Tue, 12 Apr 2005 11:40:13 +0200 |
Cedric, All,
On 4/11/05, Cedric Roux <address@hidden> wrote:
> Dear Qemu people,
>
> there is a bug in slirp/udp.c for tftp handling.
> You do:
> if (ntohs(uh->uh_dport) == 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.
>
> 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