代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ian Page Hands <iphands@gmail.com>
Date: Tue, 8 Jun 2021 13:48:56 -0400
Subject: [PATCH] efinet: Add DHCP proxy support
If a proxyDHCP configuration is used, the server name, server IP and boot
file values should be taken from the DHCP proxy offer instead of the DHCP
server ack packet. Currently that case is not handled, add support for it.
Signed-off-by: Ian Page Hands <iphands@gmail.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
grub-core/net/drivers/efi/efinet.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
index e11d759f19a..1a24f38a21a 100644
--- a/grub-core/net/drivers/efi/efinet.c
+++ b/grub-core/net/drivers/efi/efinet.c
@@ -850,10 +850,31 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device,
else
{
grub_dprintf ("efinet", "using ipv4 and dhcp\n");
+
+ struct grub_net_bootp_packet *dhcp_ack = &pxe_mode->dhcp_ack;
+
+ if (pxe_mode->proxy_offer_received)
+ {
+ grub_dprintf ("efinet", "proxy offer receive");
+ struct grub_net_bootp_packet *proxy_offer = &pxe_mode->proxy_offer;
+
+ if (proxy_offer && dhcp_ack->boot_file[0] == '\0')
+ {
+ grub_dprintf ("efinet", "setting values from proxy offer");
+ /* Here we got a proxy offer and the dhcp_ack has a nil boot_file
+ * Copy the proxy DHCP offer details into the bootp_packet we are
+ * sending forward as they are the deatils we need.
+ */
+ *dhcp_ack->server_name = *proxy_offer->server_name;
+ *dhcp_ack->boot_file = *proxy_offer->boot_file;
+ dhcp_ack->server_ip = proxy_offer->server_ip;
+ }
+ }
+
grub_net_configure_by_dhcp_ack (card->name, card, 0,
(struct grub_net_bootp_packet *)
- packet_buf,
- packet_bufsz,
+ &pxe_mode->dhcp_ack,
+ sizeof (pxe_mode->dhcp_ack),
1, device, path);
grub_dprintf ("efinet", "device: `%s' path: `%s'\n", *device, *path);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。