aboutsummaryrefslogtreecommitdiff
path: root/tftp.c
diff options
context:
space:
mode:
authorMilan Plzik <milan.plzik@gmail.com>2010-01-07 13:39:43 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-13 17:14:16 -0600
commit2e635d3891dac1c13fb33157c670e45f0f41d3c3 (patch)
tree2ab85d579360de849d7b82bb6d54ecd5cd93dffa /tftp.c
parent7a6319016b4013c75d4bbfbed53ad1fc0621a4cc (diff)
downloadslirp-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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tftp.c b/tftp.c
index e427d15..d372efb 100644
--- a/tftp.c
+++ b/tftp.c
@@ -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;
}
}