Bug 11041

Summary: tftp client reports ERROR when tftp server does not support block option
Product: Busybox Reporter: Mike Berger <mabnhdev>
Component: NetworkingAssignee: Mike Berger <mabnhdev>
Status: RESOLVED WONTFIX    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.28.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

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.