]> git.proxmox.com Git - qemu.git/commit
slirp: Implement TFTP Blocksize option
authorHervé Poussineau <hpoussin@reactos.org>
Thu, 13 Sep 2012 05:55:01 +0000 (07:55 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Thu, 13 Sep 2012 22:26:55 +0000 (00:26 +0200)
commit95b1ad7ad86793c27ab8e9987be69571937900d1
tree3f5bdb71ea0025647bec3e7b69fe4d2a6c780eae
parenteb7faf0e3a45b0a0089035f972080ca4bd2e15ce
slirp: Implement TFTP Blocksize option

This option is described in RFC 1783. As this is only an optional field,
we may ignore it in some situations and handle it in some others.

However, MS Windows 2003 PXE boot client requests a block size of the MTU
(most of the times 1472 bytes), and doesn't work if the option is not
acknowledged (with whatever value).

According to the RFC 1783, we cannot acknowledge the option with a bigger
value than the requested one.

As current implementation is using 512 bytes by block, accept the option
with a value of 512 if the option was specified, and don't acknowledge it
if it is not present or less than 512 bytes.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
slirp/tftp.c