]> TLD Linux GIT Repositories - packages/grub2.git/blob - grub2-tftp_fix.patch
- R: issue for /etc/os-release
[packages/grub2.git] / grub2-tftp_fix.patch
1 http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4548
2
3 diff -dur grub-2.00.orig/ChangeLog grub-2.00/ChangeLog
4 --- grub-2.00.orig/ChangeLog    2012-06-28 02:06:26.000000000 +0200
5 +++ grub-2.00/ChangeLog 2012-10-28 10:52:48.619830487 +0100
6 @@ -1,3 +1,9 @@
7 +2012-07-02  Vladimir Serbinenko  <phcoder@gmail.com>
8 +
9 +       * grub-core/net/tftp.c (ack): Fix endianness problem.
10 +       (tftp_receive): Likewise.
11 +       Reported by: Michael Davidsaver.
12 +
13  2012-06-27  Vladimir Serbinenko  <phcoder@gmail.com>
14  
15         * configure.ac: Bump version to 2.00.
16 diff -dur grub-2.00.orig/grub-core/net/tftp.c grub-2.00/grub-core/net/tftp.c
17 --- grub-2.00.orig/grub-core/net/tftp.c 2012-06-22 17:42:07.000000000 +0200
18 +++ grub-2.00/grub-core/net/tftp.c      2012-10-28 10:52:11.463407895 +0100
19 @@ -143,7 +143,7 @@
20  
21    tftph_ack = (struct tftphdr *) nb_ack.data;
22    tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
23 -  tftph_ack->u.ack.block = block;
24 +  tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
25  
26    err = grub_net_send_udp_packet (data->sock, &nb_ack);
27    if (err)
28 @@ -225,7 +225,7 @@
29             grub_priority_queue_pop (data->pq);
30  
31             if (file->device->net->packs.count < 50)
32 -             err = ack (data, tftph->u.data.block);
33 +             err = ack (data, data->block + 1);
34             else
35               {
36                 file->device->net->stall = 1;