diff options
author | Milan Plzik <milan.plzik@gmail.com> | 2010-01-07 13:39:43 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-01-13 17:14:16 -0600 |
commit | 2e635d3891dac1c13fb33157c670e45f0f41d3c3 (patch) | |
tree | 2ab85d579360de849d7b82bb6d54ecd5cd93dffa /tftp.c | |
parent | 7a6319016b4013c75d4bbfbed53ad1fc0621a4cc (diff) | |
download | slirp-2e635d3891dac1c13fb33157c670e45f0f41d3c3.zip slirp-2e635d3891dac1c13fb33157c670e45f0f41d3c3.tar.gz slirp-2e635d3891dac1c13fb33157c670e45f0f41d3c3.tar.bz2 |
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>
Diffstat (limited to 'tftp.c')
-rw-r--r-- | tftp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -366,6 +366,7 @@ static void tftp_handle_rrq(Slirp *slirp, struct tftp_t *tp, int pktlen) } tftp_send_oack(spt, "tsize", tsize, tp); + return; } } |