* grub-core/net/tftp.c: Send tftp ack packet before closing the socket.

This commit is contained in:
Avik Sil 2013-08-14 20:32:42 -03:00 committed by Paulo Flabiano Smorigo
parent 412ce9165c
commit 369508b3cb
2 changed files with 7 additions and 1 deletions

View file

@ -1,4 +1,8 @@
2013-08-14 Avik Sil <aviksil@in.ibm.com> 2013-08-14 Avik Sil <aviksil@in.ibm.com>
* grub-core/net/tftp.c: Send tftp ack packet before closing the socket.
2013-08-14 Avik Sil <aviksil@in.ibm.com>
* grub-core/net/drivers/ieee1275/ofnet.c: Get proper mac address when * grub-core/net/drivers/ieee1275/ofnet.c: Get proper mac address when
using qemu. using qemu.

View file

@ -243,6 +243,8 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
data->block++; data->block++;
if (size < data->block_size) if (size < data->block_size)
{ {
if (data->ack_sent < data->block)
ack (data, data->block);
file->device->net->eof = 1; file->device->net->eof = 1;
file->device->net->stall = 1; file->device->net->stall = 1;
grub_net_udp_close (data->sock); grub_net_udp_close (data->sock);