Qemu's internal TFTP server breaks lock-step-iness of TFTP
authorMilan Plzik <milan.plzik@gmail.com>
Thu, 7 Jan 2010 12:39:43 +0000 (13:39 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 13 Jan 2010 23:14:16 +0000 (17:14 -0600)
commit041ecc27e88d3df8a6f476607bc4294ba2a3ffcb
treea279471075a9598bf03e1ab901788a2756171d7a
parent09f378e9e5db81b1c0911959a6e9c89738c8e207
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>
slirp/tftp.c