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>
1 file changed
tree: a279471075a9598bf03e1ab901788a2756171d7a
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. default-configs/
  6. fpu/
  7. gdb-xml/
  8. hw/
  9. linux-user/
  10. net/
  11. pc-bios/
  12. QMP/
  13. roms/
  14. slirp/
  15. target-alpha/
  16. target-arm/
  17. target-cris/
  18. target-i386/
  19. target-m68k/
  20. target-microblaze/
  21. target-mips/
  22. target-ppc/
  23. target-s390x/
  24. target-sh4/
  25. target-sparc/
  26. tcg/
  27. tests/
  28. .gitignore
  29. .gitmodules
  30. a.out.h
  31. acl.c
  32. acl.h
  33. aes.c
  34. aes.h
  35. aio.c
  36. alpha-dis.c
  37. alpha.ld
  38. arm-dis.c
  39. arm-semi.c
  40. arm.ld
  41. async.c
  42. balloon.h
  43. block-migration.c
  44. block-migration.h
  45. block.c
  46. block.h
  47. block_int.h
  48. bswap.h
  49. bt-host.c
  50. bt-host.h
  51. bt-vhci.c
  52. buffered_file.c
  53. buffered_file.h
  54. cache-utils.c
  55. cache-utils.h
  56. Changelog
  57. check-qdict.c
  58. check-qfloat.c
  59. check-qint.c
  60. check-qjson.c
  61. check-qlist.c
  62. check-qstring.c
  63. cmd.c
  64. cmd.h
  65. cocoa.m
  66. CODING_STYLE
  67. config.h
  68. configure
  69. console.c
  70. console.h
  71. COPYING
  72. COPYING.LIB
  73. cpu-all.h
  74. cpu-common.h
  75. cpu-defs.h
  76. cpu-exec.c
  77. create_config
  78. cris-dis.c
  79. curses.c
  80. curses_keys.h
  81. cutils.c
  82. d3des.c
  83. d3des.h
  84. def-helper.h
  85. device_tree.c
  86. device_tree.h
  87. dis-asm.h
  88. disas.c
  89. disas.h
  90. dma-helpers.c
  91. dma.h
  92. dyngen-exec.h
  93. elf.h
  94. envlist.c
  95. envlist.h
  96. exec-all.h
  97. exec.c
  98. feature_to_c.sh
  99. gdbstub.c
  100. gdbstub.h
  101. gen-icount.h
  102. host-utils.c
  103. host-utils.h
  104. hostregs_helper.h
  105. hpet.h
  106. hppa-dis.c
  107. hppa.ld
  108. hxtool
  109. i386-dis.c
  110. i386.ld
  111. ia64.ld
  112. input.c
  113. ioport-user.c
  114. ioport.c
  115. ioport.h
  116. json-lexer.c
  117. json-lexer.h
  118. json-parser.c
  119. json-parser.h
  120. json-streamer.c
  121. json-streamer.h
  122. keymaps.c
  123. keymaps.h
  124. kvm-all.c
  125. kvm.h
  126. libfdt_env.h
  127. LICENSE
  128. linux-aio.c
  129. m68k-dis.c
  130. m68k-semi.c
  131. m68k.ld
  132. MAINTAINERS
  133. Makefile
  134. Makefile.hw
  135. Makefile.objs
  136. Makefile.target
  137. Makefile.user
  138. microblaze-dis.c
  139. migration-exec.c
  140. migration-fd.c
  141. migration-tcp.c
  142. migration-unix.c
  143. migration.c
  144. migration.h
  145. mips-dis.c
  146. mips.ld
  147. module.c
  148. module.h
  149. monitor.c
  150. monitor.h
  151. nbd.c
  152. nbd.h
  153. net-checksum.c
  154. net.c
  155. net.h
  156. osdep.c
  157. osdep.h
  158. path.c
  159. pci-ids.txt
  160. posix-aio-compat.c
  161. ppc-dis.c
  162. ppc.ld
  163. ppc64.ld
  164. qbool.c
  165. qbool.h
  166. qdict-test-data.txt
  167. qdict.c
  168. qdict.h
  169. qemu-aio.h
  170. qemu-binfmt-conf.sh
  171. qemu-char.c
  172. qemu-char.h
  173. qemu-common.h
  174. qemu-config.c
  175. qemu-config.h
  176. qemu-doc.texi
  177. qemu-img-cmds.hx
  178. qemu-img.c
  179. qemu-img.texi
  180. qemu-io.c
  181. qemu-lock.h
  182. qemu-log.h
  183. qemu-malloc.c
  184. qemu-monitor.hx
  185. qemu-nbd.c
  186. qemu-nbd.texi
  187. qemu-objects.h
  188. qemu-option.c
  189. qemu-option.h
  190. qemu-options.hx
  191. qemu-queue.h
  192. qemu-sockets.c
  193. qemu-tech.texi
  194. qemu-thread.c
  195. qemu-thread.h
  196. qemu-timer.h
  197. qemu-tool.c
  198. qemu.sasl
  199. qemu_socket.h
  200. qerror.c
  201. qerror.h
  202. qfloat.c
  203. qfloat.h
  204. qint.c
  205. qint.h
  206. qjson.c
  207. qjson.h
  208. qlist.c
  209. qlist.h
  210. qobject.h
  211. qstring.c
  212. qstring.h
  213. readline.c
  214. readline.h
  215. README
  216. rules.mak
  217. s390-dis.c
  218. s390.ld
  219. savevm.c
  220. sdl.c
  221. sdl_keysym.h
  222. sdl_zoom.c
  223. sdl_zoom.h
  224. sdl_zoom_template.h
  225. sh4-dis.c
  226. softmmu-semi.h
  227. softmmu_defs.h
  228. softmmu_exec.h
  229. softmmu_header.h
  230. softmmu_template.h
  231. sparc-dis.c
  232. sparc.ld
  233. sparc64.ld
  234. sysemu.h
  235. targphys.h
  236. tcg-runtime.c
  237. texi2pod.pl
  238. thunk.c
  239. thunk.h
  240. TODO
  241. translate-all.c
  242. uboot_image.h
  243. usb-bsd.c
  244. usb-linux.c
  245. usb-stub.c
  246. VERSION
  247. vgafont.h
  248. vl.c
  249. vnc-auth-sasl.c
  250. vnc-auth-sasl.h
  251. vnc-auth-vencrypt.c
  252. vnc-auth-vencrypt.h
  253. vnc-tls.c
  254. vnc-tls.h
  255. vnc.c
  256. vnc.h
  257. vnc_keysym.h
  258. vnchextile.h
  259. x86_64.ld
  260. x_keymap.c
  261. x_keymap.h