[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/14] UEFI IPv6 PXE support
From: |
Josef Bacik |
Subject: |
[PATCH 02/14] UEFI IPv6 PXE support |
Date: |
Wed, 10 Feb 2016 13:20:56 -0800 |
From: Michael Chang <address@hidden>
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 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/grub-core/net/drivers/efi/efinet.c
b/grub-core/net/drivers/efi/efinet.c
index 5388f95..2b9a0e7 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -378,11 +378,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.8.1
- Re: [PATCH 11/14] dns: reset data->naddresses for every packet we receive, (continued)
- [PATCH 12/14] icmp6: use default interface as the route interface, Josef Bacik, 2016/02/10
- [PATCH 04/14] tcp: add window scaling and RTTM support, Josef Bacik, 2016/02/10
- [PATCH 01/14] Added net_bootp6 command, Josef Bacik, 2016/02/10
- [PATCH 02/14] UEFI IPv6 PXE support,
Josef Bacik <=
- [PATCH 05/14] net: don't free uninitialized sockets in dns, Josef Bacik, 2016/02/10
- [PATCH 07/14] efinet: retransmit if our device is busy, Josef Bacik, 2016/02/10
- [PATCH 03/14] Use UEFI MAC device as default configured by net_bootp6, Josef Bacik, 2016/02/10
- [PATCH 14/14] net: add interfaces when we open a card, Josef Bacik, 2016/02/10
- [PATCH 06/14] net: fix ipv6 routing, Josef Bacik, 2016/02/10