]> git.ipfire.org Git - thirdparty/qemu.git/commit
Handle TFTP ERROR from client
authorThomas Horsten <thomas@horsten.com>
Thu, 7 Jan 2010 17:01:28 +0000 (17:01 +0000)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 12 Jan 2010 19:31:51 +0000 (13:31 -0600)
commit66dbb62824845e91808171a675998706ce359c71
tree20982ec3bd96823fa8c881ecf303265fa13c863a
parentd47d251286994f25336b8c9220fa8ffe5866feec
Handle TFTP ERROR from client

If a PXE client only wants to find out the size of a file, it will
open the file and then abort the transfer by sending a TFTP ERROR packet.

The ERROR packet should cause qemu to terminate the session. If not,
the sessions will soon run out and cause timeouts in the client.

Also, if a TFTP session already exists with same IP/UDP port, it
should be terminated when a new RRQ is received, instead of creating a
duplicate (which will never be used).

A patch for gPXE to send the ERROR packet is also being submitted to
gPXE. Together they resolve slowness/hanging when booting pxegrub from
qemu's internal TFTP server. The patch from Milan Plzik to return
after sending OACK is also required for a complete fix.

Signed-off-by: Thomas Horsten <thomas@horsten.com>
Signed-off-by: Milan Plzik <milan.plzik@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit bfe4e172421d711d1d5b049f90be0961451c8259)
slirp/tftp.c