[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/10] kern/efi/efi: Correct endianness in IPv6 device path
From: |
Michael Chang |
Subject: |
[PATCH 09/10] kern/efi/efi: Correct endianness in IPv6 device path |
Date: |
Mon, 16 Dec 2024 16:03:38 +0800 |
Signed-off-by: Michael Chang <mchang@suse.com>
---
grub-core/kern/efi/efi.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 2997ab721..122adf267 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -790,22 +790,22 @@ grub_efi_print_device_path (grub_efi_device_path_t *dp)
grub_efi_ipv6_device_path_t *ipv6
= (grub_efi_ipv6_device_path_t *) dp;
grub_printf
("/IPv6(%x:%x:%x:%x:%x:%x:%x:%x,%x:%x:%x:%x:%x:%x:%x:%x,%u,%u,%x,%x)",
- (unsigned) ipv6->local_ip_address[0],
- (unsigned) ipv6->local_ip_address[1],
- (unsigned) ipv6->local_ip_address[2],
- (unsigned) ipv6->local_ip_address[3],
- (unsigned) ipv6->local_ip_address[4],
- (unsigned) ipv6->local_ip_address[5],
- (unsigned) ipv6->local_ip_address[6],
- (unsigned) ipv6->local_ip_address[7],
- (unsigned) ipv6->remote_ip_address[0],
- (unsigned) ipv6->remote_ip_address[1],
- (unsigned) ipv6->remote_ip_address[2],
- (unsigned) ipv6->remote_ip_address[3],
- (unsigned) ipv6->remote_ip_address[4],
- (unsigned) ipv6->remote_ip_address[5],
- (unsigned) ipv6->remote_ip_address[6],
- (unsigned) ipv6->remote_ip_address[7],
+ (unsigned) grub_cpu_to_be16
(ipv6->local_ip_address[0]),
+ (unsigned) grub_cpu_to_be16
(ipv6->local_ip_address[1]),
+ (unsigned) grub_cpu_to_be16
(ipv6->local_ip_address[2]),
+ (unsigned) grub_cpu_to_be16
(ipv6->local_ip_address[3]),
+ (unsigned) grub_cpu_to_be16
(ipv6->local_ip_address[4]),
+ (unsigned) grub_cpu_to_be16
(ipv6->local_ip_address[5]),
+ (unsigned) grub_cpu_to_be16
(ipv6->local_ip_address[6]),
+ (unsigned) grub_cpu_to_be16
(ipv6->local_ip_address[7]),
+ (unsigned) grub_cpu_to_be16
(ipv6->remote_ip_address[0]),
+ (unsigned) grub_cpu_to_be16
(ipv6->remote_ip_address[1]),
+ (unsigned) grub_cpu_to_be16
(ipv6->remote_ip_address[2]),
+ (unsigned) grub_cpu_to_be16
(ipv6->remote_ip_address[3]),
+ (unsigned) grub_cpu_to_be16
(ipv6->remote_ip_address[4]),
+ (unsigned) grub_cpu_to_be16
(ipv6->remote_ip_address[5]),
+ (unsigned) grub_cpu_to_be16
(ipv6->remote_ip_address[6]),
+ (unsigned) grub_cpu_to_be16
(ipv6->remote_ip_address[7]),
(unsigned) ipv6->local_port,
(unsigned) ipv6->remote_port,
(unsigned) ipv6->protocol,
--
2.47.1
- [PATCH 00/10] Support UEFI HTTP boot with IPv6 and DNS, Michael Chang, 2024/12/16
- [PATCH 01/10] net/http: Check result of grub_netbuff_put() in http_receive(), Michael Chang, 2024/12/16
- [PATCH 02/10] efinet: Add structures for PXE messages, Michael Chang, 2024/12/16
- [PATCH 04/10] grub.texi: Add net_dhcp6 document, Michael Chang, 2024/12/16
- [PATCH 05/10] bootp: Process DHCPACK packet during HTTP Boot, Michael Chang, 2024/12/16
- [PATCH 03/10] efinet + bootp: add net_dhcp6 command supporting dhcpv6, Michael Chang, 2024/12/16
- [PATCH 06/10] efinet: Configure network from UEFI device path, Michael Chang, 2024/12/16
- [PATCH 07/10] efinet: Set DNS server from UEFI protocol, Michael Chang, 2024/12/16
- [PATCH 08/10] kern/efi/efi: Print URI and DNS device path info, Michael Chang, 2024/12/16
- [PATCH 09/10] kern/efi/efi: Correct endianness in IPv6 device path,
Michael Chang <=
- [PATCH 10/10] bootp: Fix logical operator in DHCP option overload check, Michael Chang, 2024/12/16