* grub-core/net/tftp.c (ack): Fix endianness problem.
(tftp_receive): Likewise. Reported by: Michael Davidsaver.
This commit is contained in:
parent
e7850aa9b5
commit
a706f4cc6b
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/net/tftp.c (ack): Fix endianness problem.
|
||||||
|
(tftp_receive): Likewise.
|
||||||
|
Reported by: Michael Davidsaver.
|
||||||
|
|
||||||
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* gentpl.py: Make mans depend on grub-mkconfig_lib.
|
* gentpl.py: Make mans depend on grub-mkconfig_lib.
|
||||||
|
|
|
@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
|
||||||
|
|
||||||
tftph_ack = (struct tftphdr *) nb_ack.data;
|
tftph_ack = (struct tftphdr *) nb_ack.data;
|
||||||
tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
|
tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
|
||||||
tftph_ack->u.ack.block = block;
|
tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
|
||||||
|
|
||||||
err = grub_net_send_udp_packet (data->sock, &nb_ack);
|
err = grub_net_send_udp_packet (data->sock, &nb_ack);
|
||||||
if (err)
|
if (err)
|
||||||
|
@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
||||||
grub_priority_queue_pop (data->pq);
|
grub_priority_queue_pop (data->pq);
|
||||||
|
|
||||||
if (file->device->net->packs.count < 50)
|
if (file->device->net->packs.count < 50)
|
||||||
err = ack (data, tftph->u.data.block);
|
err = ack (data, data->block + 1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
file->device->net->stall = 1;
|
file->device->net->stall = 1;
|
||||||
|
|
Loading…
Reference in a new issue