qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Milan Plzik <milan.plzik@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Qemu's internal TFTP server breaks lock-step-iness of TFTP
Date: Thu, 07 Jan 2010 13:39:43 +0100	[thread overview]
Message-ID: <1262867983.18404.659.camel@localhost> (raw)

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

  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>


[-- Attachment #2: qemu_tftp_handle_oack_correctly.patch --]
[-- Type: text/x-patch, Size: 283 bytes --]

diff --git a/slirp/tftp.c b/slirp/tftp.c
index 082f5d0..db869fc 100644
--- a/slirp/tftp.c
+++ b/slirp/tftp.c
@@ -362,6 +362,7 @@ static void tftp_handle_rrq(Slirp *slirp, struct tftp_t *tp, int pktlen)
 	  }
 
 	  tftp_send_oack(spt, "tsize", tsize, tp);
+	  return;
       }
   }
 

             reply	other threads:[~2010-01-07 12:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 12:39 Milan Plzik [this message]
2010-01-13 23:26 ` [Qemu-devel] Qemu's internal TFTP server breaks lock-step-iness of TFTP Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2010-01-06 22:11 Milan Plzik
2010-01-06 22:43 ` Anthony Liguori
2010-01-07 12:51   ` Milan Plzik
2010-01-07 15:42 ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1262867983.18404.659.camel@localhost \
    --to=milan.plzik@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).