Bug 11041 - tftp client reports ERROR when tftp server does not support block option
Summary: tftp client reports ERROR when tftp server does not support block option
Status: RESOLVED WONTFIX
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: 1.28.x
Hardware: All Linux
: P5 minor
Target Milestone: ---
Assignee: Mike Berger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-24 11:00 UTC by Mike Berger
Modified: 2018-05-24 15:29 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Berger 2018-05-24 11:00:25 UTC
Performing a tftp file transfer with a non-default blocksize against a tftp server that does not support the blocksize operation results in the following message:

Error: falling back to blocksize 512

The command succeeds if the file being transferred does not exceed the server's file size limit.

The message is misleading and uninformative since, in most cases, the transfer does indeed succeed.

The command does return the correct status to the shell - it is the "warning" itself that is misleading.

I propose printing out the following more informative message instead.

Note: the block size option is not supported by the remote TFTP server.
      Without this option, transfers may be significantly slower and
      may be subject to transfer size restrictions.
Comment 1 Denys Vlasenko 2018-05-24 14:35:28 UTC
(In reply to Mike Berger from comment #0)
>results in the following message:
>
>    Error: falling back to blocksize 512

I'm not seeing string "Error: " in the source:

if (blksize != TFTP_BLKSIZE_DEFAULT)
        bb_error_msg("falling back to blocksize "TFTP_BLKSIZE_DEFAULT_STR);

It should be printing "tftp: falling back to blocksize 512". Which looks good enough for me.
Comment 2 Mike Berger 2018-05-24 15:28:12 UTC
Okay.  It looks like the "Error:" was coming from a wrapper in my environment.