MdeModulePkg Ip4Dxe: Ip4Config2 to request DHCP Option6 DNS server IP
Ip4Config2 protocol implementation must request for DNS server info when the policy is set to DHCP. And when a DHCP server responds to it with a list of DNS server addresses, it must parse it and set it for the instance. Without this, nobody can do a Ip4Config->GetData for DNS server IPs before calling Dns->Configure(). This will mean a DHCP is initiated when calling Dns->Configure(), thus causing serious performance issues. This patch attempts to address this issue. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18560 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
sfu5
parent
33ecfa8af9
commit
9feefde0cb
@@ -2,6 +2,7 @@
|
||||
Definitions for EFI IPv4 Configuration II Protocol implementation.
|
||||
|
||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -27,7 +28,7 @@
|
||||
#define DHCP_TAG_PARA_LIST 55
|
||||
#define DHCP_TAG_NETMASK 1
|
||||
#define DHCP_TAG_ROUTER 3
|
||||
|
||||
#define DHCP_TAG_DNS_SERVER 6
|
||||
|
||||
#define DATA_ATTRIB_SET(Attrib, Bits) (BOOLEAN)((Attrib) & (Bits))
|
||||
#define SET_DATA_ATTRIB(Attrib, Bits) ((Attrib) |= (Bits))
|
||||
@@ -207,6 +208,7 @@ struct _IP4_CONFIG2_INSTANCE {
|
||||
typedef struct {
|
||||
EFI_DHCP4_PACKET_OPTION Head;
|
||||
UINT8 Route;
|
||||
UINT8 Dns;
|
||||
} IP4_CONFIG2_DHCP4_OPTION;
|
||||
#pragma pack()
|
||||
|
||||
|
Reference in New Issue
Block a user