From: "Sivaraman Nainar" <sivaramann@amiindia.co.in>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "liming.gao@intel.com" <liming.gao@intel.com>,
"jiaxin.wu@intel.com" <jiaxin.wu@intel.com>
Subject: [edk2-devel] [Patch ] IP is getting Configured when IP Configuration is disabled
Date: Thu, 13 Aug 2020 06:50:57 +0000 [thread overview]
Message-ID: <B4DE137BDB63634BAC03BD9DE765F19702B4B34521@VENUS1.in.megatrends.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2659 bytes --]
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2873
*** E:\Work\NWStack\EDK2Tickets\IPConfigFix\Mod\Ip4Config2Impl.c 2020-08-04 18:38:06.000000000 +05-30
--- E:\Work\NWStack\EDK2Tickets\IPConfigFix\Org\Ip4Config2Impl.c 2020-05-07 22:54:46.000000000 +05-30
***************
*** 1965,1978 ****
IP4_CONFIG2_INSTANCE *TmpInstance;
LIST_ENTRY *Entry;
EFI_STATUS Status;
UINTN Index;
UINT16 IfIndex;
IP4_CONFIG2_DATA_ITEM *DataItem;
! BOOLEAN IPConfigEnabled = FALSE;
! IP4_CONFIG2_IFR_NVDATA *IfrFromNvData = NULL;
IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
Instance->Signature = IP4_CONFIG2_INSTANCE_SIGNATURE;
--- 1965,1977 ----
IP4_CONFIG2_INSTANCE *TmpInstance;
LIST_ENTRY *Entry;
EFI_STATUS Status;
UINTN Index;
UINT16 IfIndex;
IP4_CONFIG2_DATA_ITEM *DataItem;
!
IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
Instance->Signature = IP4_CONFIG2_INSTANCE_SIGNATURE;
***************
*** 2038,2063 ****
//
// Try to read the config data from NV variable.
// If not found, write initialized config data into NV variable
// as a default config data.
//
! Status = GetVariable2(IpSb->MacString, &gIp4Config2NvDataGuid, (VOID**)&IfrFromNvData, NULL);
! if(!EFI_ERROR(Status)){
! if (IfrFromNvData->Configure == TRUE) {
! Status = Ip4Config2ReadConfigData (IpSb->MacString, Instance);
! if (Status == EFI_NOT_FOUND) {
! Status = Ip4Config2WriteConfigData (IpSb->MacString, Instance);
! }
! IPConfigEnabled = TRUE;
! }
! FreePool(IfrFromNvData);
! }
! if(!IPConfigEnabled){
! Status = Ip4Config2WriteConfigData (IpSb->MacString, Instance);
! }
if (EFI_ERROR (Status)) {
return Status;
}
Instance->Ip4Config2.SetData = EfiIp4Config2SetData;
--- 2037,2052 ----
//
// Try to read the config data from NV variable.
// If not found, write initialized config data into NV variable
// as a default config data.
//
! Status = Ip4Config2ReadConfigData (IpSb->MacString, Instance);
! if (Status == EFI_NOT_FOUND) {
! Status = Ip4Config2WriteConfigData (IpSb->MacString, Instance);
! }
if (EFI_ERROR (Status)) {
return Status;
}
Instance->Ip4Config2.SetData = EfiIp4Config2SetData;
[-- Attachment #2: Type: text/html, Size: 9620 bytes --]
next reply other threads:[~2020-08-13 6:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 6:50 Sivaraman Nainar [this message]
[not found] <162AC138777CB9A5.16363@groups.io>
2020-08-20 15:16 ` [edk2-devel] [Patch ] IP is getting Configured when IP Configuration is disabled Sivaraman Nainar
2020-08-20 15:55 ` Maciej Rabeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B4DE137BDB63634BAC03BD9DE765F19702B4B34521@VENUS1.in.megatrends.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox