[PATCH] tftp(d): fix wrong logic in get/put feature preprocessor work + some error handling enhancements

Benjamin Cama benoar at free.fr
Mon Mar 8 00:14:45 UTC 2010


Le vendredi 05 mars 2010 à 23:41 +0100, Denys Vlasenko a écrit :
> On Friday 05 March 2010 21:20, Benjamin Cama wrote:
> > > > I tried to build tftpd applet with only "get" opcode support, but it
> > > > didn't work (no data is transfered). I also got some accidental file
> > > > overwriting problem which seems to be due to this problem.
> > > 
> > > bbox version and .config?
> > 
> > Latest git (commit 4b1100edd8180efa2e81860ef2fadeebcb21f5fa), .config
> > attached (default one minus CONFIG_TFTP and CONFIG_FEATURE_TFTP_PUT).
> 
> As expected:
> 
> config FEATURE_TFTP_GET
>         bool "Enable \"get\" command"
>         default y
>         depends on TFTP || TFTPD
>         help
>           Add support for the GET command within the TFTP client. This allows
>           a client to retrieve a file from a TFTP server.
>           Also enable upload support in tftpd, if tftpd is selected.
> 
> 
> It enables _upload_ support it tftpd. Not download.
> You can't download files from tftpd server configured like this.

Oh my ... I'm very sorry for this confusion on my side. I didn't read
the help and was caught by this.

> What you want to do is to enable CONFIG_FEATURE_TFTP_PUT,
> and disable CONFIG_FEATURE_TFTP_GET.
> 
> Where do you think the wording needs to be changed to make it clearer?
[...]
> Please enable CONFIG_FEATURE_TFTP_PUT and try again.
> Please try latest git, I tried to make option description better:
> 
> http://git.busybox.net/busybox/commit/?id=cbcc1236f806f18e6386e6e1f495a9832b7d307d

Yes, changing this description will be far better to help people who too
quickly read it to understand. And I tested it : it works OK with
CONFIG_FEATURE_TFTP_PUT enabled.

I was thinking about still applying my patch to have get and put
together (as the way it's grouped now seems a bit strange to me, as you
may have realized), but I think changing the meaning of this option will
hurt too much regarding people being used to the old one. Or maybe
decoupling the get/put part and having them separated for client and
server ? Don't know if it will be usefull: if someone else feels the
need, I could do that.

Regards and thanks for your patience,
benjamin



More information about the busybox mailing list