[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] UEFI IPv6 PXE support
From: |
Michael Chang |
Subject: |
[PATCH 2/3] UEFI IPv6 PXE support |
Date: |
Wed, 15 Apr 2015 17:05:08 +0800 |
When system is booted from UEFI IPv6 PXE, the network interface can be
configured directly by cached DHCPv6 packet in firmware without doing it all
over again by contacting DHCP server.
---
grub-core/net/drivers/efi/efinet.c | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/grub-core/net/drivers/efi/efinet.c
b/grub-core/net/drivers/efi/efinet.c
index f171f20..b1837e3 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -257,11 +257,25 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char
**device,
if (! pxe)
continue;
pxe_mode = pxe->mode;
- grub_net_configure_by_dhcp_ack (card->name, card, 0,
- (struct grub_net_bootp_packet *)
- &pxe_mode->dhcp_ack,
- sizeof (pxe_mode->dhcp_ack),
- 1, device, path);
+
+ if (pxe_mode->using_ipv6)
+ {
+ grub_net_configure_by_dhcpv6_reply (card->name, card, 0,
+ (struct grub_net_dhcpv6_packet *)
+ &pxe_mode->dhcp_ack,
+ sizeof (pxe_mode->dhcp_ack),
+ 1, device, path);
+ if (grub_errno)
+ grub_print_error ();
+ }
+ else
+ {
+ grub_net_configure_by_dhcp_ack (card->name, card, 0,
+ (struct grub_net_bootp_packet *)
+ &pxe_mode->dhcp_ack,
+ sizeof (pxe_mode->dhcp_ack),
+ 1, device, path);
+ }
return;
}
}
--
1.7.3.4
[PATCH 2/3] UEFI IPv6 PXE support,
Michael Chang <=
[PATCH 3/3] Use UEFI MAC device as default configured by net_bootp6, Michael Chang, 2015/04/15
Re: [RFC] Support DHCPv6 and UEFI IPv6 PXE, Andrei Borzenkov, 2015/04/17