qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] slirp: support dynamic block size for TFTP tran


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH] slirp: support dynamic block size for TFTP transfers
Date: Tue, 22 Nov 2016 09:19:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 21.11.2016 20:51, H. Peter Anvin wrote:
> On 11/21/16 11:45, Hervé Poussineau wrote:
>> The blocksize option is defined in RFC 1783.
>> We now support block sizes between 1 and 1432 bytes, instead of 512 only.
> 
> It ought to be 1476: Ethernet MTU = 1500, minus a minimum of 20 bytes
> for an IPv4 header and 4 for a TFTP header.

Don't forget the size of the UDP header - so the maximum value is 1468.
However, if you want to play safe, you should also consider that
somebody is putting additional options into the IPv4 header, so the IPv4
header can be up to 60 bytes instead of only 20 bytes. So a real safe
value for the maximum TFTP block size is:

 1500 - 60 - 8 - 4 = 1428

This is also what is mentioned in RFC2348 which obsoletes RFC1783 (that
mentions 1432).

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]