mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-09 18:02:40 +00:00
Fix tftp endianness problem.
This commit is contained in:
parent
1c65b2d2f1
commit
227bfa7488
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -2,6 +2,7 @@ grub2 (2.00-7) UNRELEASED; urgency=low
|
|||||||
|
|
||||||
* Backport from upstream:
|
* Backport from upstream:
|
||||||
- Fix stderr leakage from grub-probe in is_path_readable_by_grub.
|
- Fix stderr leakage from grub-probe in is_path_readable_by_grub.
|
||||||
|
- Fix tftp endianness problem.
|
||||||
|
|
||||||
-- Colin Watson <cjwatson@debian.org> Wed, 26 Sep 2012 13:16:52 +0100
|
-- Colin Watson <cjwatson@debian.org> Wed, 26 Sep 2012 13:16:52 +0100
|
||||||
|
|
||||||
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -24,3 +24,4 @@ mkconfig_ubuntu_recovery.patch
|
|||||||
msdos_embed_off_by_one.patch
|
msdos_embed_off_by_one.patch
|
||||||
emu_freebsd.patch
|
emu_freebsd.patch
|
||||||
mkconfig_stderr_handling.patch
|
mkconfig_stderr_handling.patch
|
||||||
|
tftp_endianness.patch
|
||||||
|
29
debian/patches/tftp_endianness.patch
vendored
Normal file
29
debian/patches/tftp_endianness.patch
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Description: Fix tftp endianness problem
|
||||||
|
Author: Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/4548
|
||||||
|
Forwarded: not-needed
|
||||||
|
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/4548
|
||||||
|
Last-Update: 2012-09-26
|
||||||
|
|
||||||
|
Index: b/grub-core/net/tftp.c
|
||||||
|
===================================================================
|
||||||
|
--- a/grub-core/net/tftp.c
|
||||||
|
+++ b/grub-core/net/tftp.c
|
||||||
|
@@ -143,7 +143,7 @@
|
||||||
|
|
||||||
|
tftph_ack = (struct tftphdr *) nb_ack.data;
|
||||||
|
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);
|
||||||
|
if (err)
|
||||||
|
@@ -225,7 +225,7 @@
|
||||||
|
grub_priority_queue_pop (data->pq);
|
||||||
|
|
||||||
|
if (file->device->net->packs.count < 50)
|
||||||
|
- err = ack (data, tftph->u.data.block);
|
||||||
|
+ err = ack (data, data->block + 1);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
file->device->net->stall = 1;
|
@ -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 New Issue
Block a user