Qemu's internal TFTP server breaks lock-step-iness of TFTP
commit3999bf32440c1ea2ceb85eef008cc56a069af13f
authorMilan Plzik <milan.plzik@gmail.com>
Thu, 7 Jan 2010 12:39:43 +0000 (7 13:39 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 13 Jan 2010 23:22:57 +0000 (13 17:22 -0600)
tree06de49dfb99e4d9e33e4f138eb36bc3351f9a69e
parenta3441a43a668c0dc31ca4c8b2d236e053d29b8da
Qemu's internal TFTP server breaks lock-step-iness of TFTP

According to RFC 1350 and RFC 2347, TFTP server should answer RRQ by
either OACK or DATA packet. Qemu's internal TFTP server answers RRQ with
additional options by sending both OACK and DATA packet, thus breaking
the "lock-step" feature of the protocol, and also confuses client.

  Proposed solution would be to, in case of OACK packet, wait for ACK
from client and just then start sending data. Attached patch implements
this.

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 1cb1a66aed921060fa34d161b52e95d05de18ec1)
slirp/tftp.c