From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from IMSVA.IN.MEGATRENDS.COM (IMSVA.IN.MEGATRENDS.COM [14.98.235.2]) by mx.groups.io with SMTP id smtpd.web11.5053.1597301465016534000 for ; Wed, 12 Aug 2020 23:51:05 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=SPF record not found (domain: amiindia.co.in, ip: 14.98.235.2, mailfrom: sivaramann@amiindia.co.in) Received: from IMSVA.IN.MEGATRENDS.COM (IMSVA.IN.MEGATRENDS.COM [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2810082055; Thu, 13 Aug 2020 12:29:43 +0530 (IST) Received: from IMSVA.IN.MEGATRENDS.COM (IMSVA.IN.MEGATRENDS.COM [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E4BDC8204A; Thu, 13 Aug 2020 12:29:42 +0530 (IST) Received: from webmail.amiindia.co.in (venus2.in.megatrends.com [10.0.0.7]) by IMSVA.IN.MEGATRENDS.COM (Postfix) with ESMTPS; Thu, 13 Aug 2020 12:29:42 +0530 (IST) Received: from VENUS1.in.megatrends.com ([fe80::951:7975:6ecf:eae5]) by Venus2.in.megatrends.com ([fe80::2002:4a07:4f17:c09b%14]) with mapi id 14.03.0248.002; Thu, 13 Aug 2020 12:20:58 +0530 From: "Sivaraman Nainar" To: "devel@edk2.groups.io" CC: "liming.gao@intel.com" , "jiaxin.wu@intel.com" Subject: [edk2-devel] [Patch ] IP is getting Configured when IP Configuration is disabled Thread-Topic: [edk2-devel] [Patch ] IP is getting Configured when IP Configuration is disabled Thread-Index: AdZxPXodVxdlySoIS2GVfZJOgEoReg== Date: Thu, 13 Aug 2020 06:50:57 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.3.114] MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-ERS: 10.0.0.7-127.5.254.253 X-TM-AS-Product-Ver: IMSVA-9.1.0.1817-8.6.0.1013-25600.005 X-TM-AS-Result: No--9.984-5.0-31-10 X-imss-scan-details: No--9.984-5.0-31-10;No--9.984-5.0-31-10 X-TMASE-Version: IMSVA-9.1.0.1817-8.6.1013-25600.005 X-TMASE-Result: 10--9.983600-10.000000 X-TMASE-MatchedRID: ls1+C1BQP6TeXhoYTo4O1VD5LQ3Tl9H7UNr9nJzA3WS2ZO4LLn5VSoOn B+2gyWrW+J4O3+1a0Zdxszs64DIYjJ5Napjzkj5fbWsCUkrA4ElYMtqMzbYRNtVfSutA6V7JclD UKdT1tWccyIv/qtqz7kmlX2scVfePArfIDVjQDX7BtFDYGmaWKhrL4FDGAJ+FCwWRLqiC/UqTvZ kBseIwt0mu4uFjBmMBf9krIFPI8jVu7xCoxCPC8oDcpVWyPxAMqAn+yHbzwCcwMfxyID/dnYFdO Obte0HXBRkDpXylQ1n3JpeE+GdRnSwwtxRkxyN3i+m1DDPm2yJkbdIIs/tC0ohIjrzeyQMKjXRn WwYGEzpSLd7cFdaYX9T42FdBOMA8kfRhdidsajMURSScn+QSXjZsncNPmaWkpvI8UZOf47j3PDi XO/tFSUHMlu64xS2E9h5TmCNtcx8PXXI9ncUgOQPtHHaupYEBDbwHABuVJosGyL0azqASn4Y3Zz Lm6B1ZIJkTSvRoRobHy/X7no4GRXt1z5f/mCLAftwZ3X11IV0= X-TMASE-SNAP-Result: 1.821001.0001-0-1-12:0,22:0,33:0,34:0-0 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_B4DE137BDB63634BAC03BD9DE765F19702B4B34521VENUS1inmegat_" --_000_B4DE137BDB63634BAC03BD9DE765F19702B4B34521VENUS1inmegat_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2873 *** 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-0= 5-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 IPConfigE= nabled =3D FALSE; ! IP4_CONFIG2_IFR_NVDATA *IfrFromNvData =3D NULL; IpSb =3D IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); Instance->Signature =3D 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 =3D IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); Instance->Signature =3D 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 =3D GetVariable2(IpSb->MacString, &gIp4Config2NvDataGuid, (VOI= D**)&IfrFromNvData, NULL); ! if(!EFI_ERROR(Status)){ ! if (IfrFromNvData->Configure =3D=3D TRUE) { ! Status =3D Ip4Config2ReadConfigData (IpSb->MacString, Instanc= e); ! if (Status =3D=3D EFI_NOT_FOUND) { ! Status =3D Ip4Config2WriteConfigData (IpSb->MacString, In= stance); ! } ! IPConfigEnabled =3D TRUE; ! } ! FreePool(IfrFromNvData); ! } ! if(!IPConfigEnabled){ ! Status =3D Ip4Config2WriteConfigData (IpSb->MacString, Instance); ! } if (EFI_ERROR (Status)) { return Status; } Instance->Ip4Config2.SetData =3D 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 =3D Ip4Config2ReadConfigData (IpSb->MacString, Instance); ! if (Status =3D=3D EFI_NOT_FOUND) { ! Status =3D Ip4Config2WriteConfigData (IpSb->MacString, Instance); ! } if (EFI_ERROR (Status)) { return Status; } Instance->Ip4Config2.SetData =3D EfiIp4Config2SetData; --_000_B4DE137BDB63634BAC03BD9DE765F19702B4B34521VENUS1inmegat_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2873

 

*** E:\Work\NWStack\EDK2Tickets\IPConfigFix\Mod\Ip4C= onfig2Impl.c          &nb= sp;    2020-08-04 18:38:06.000000000 +05-30

--- E:\Work\NWStack\EDK2Tickets\IPConfigFix\Org\Ip4C= onfig2Impl.c     2020-05-07 22:54:46.000000000 +05-= 30

***************

*** 1965,1978 ****

    IP4_CONFIG2_INSTANCE  *TmpIn= stance;

    LIST_ENTRY    = ;        *Entry;

    EFI_STATUS    = ;        Status;

    UINTN    &nbs= p;            Index;=

    UINT16    &nb= sp;           IfIndex;

    IP4_CONFIG2_DATA_ITEM *DataItem;<= o:p>

!   BOOLEAN      =             &nb= sp;            =             &nb= sp;           IPConfigEna= bled =3D FALSE;

!   IP4_CONFIG2_IFR_NVDATA  *IfrFromN= vData =3D NULL;

 

    IpSb =3D IP4_SERVICE_FROM_IP= 4_CONFIG2_INSTANCE (Instance);

 

    Instance->Signature =3D I= P4_CONFIG2_INSTANCE_SIGNATURE;

 

  

--- 1965,1977 ----

    IP4_CONFIG2_INSTANCE  *TmpIn= stance;

    LIST_ENTRY    = ;        *Entry;

    EFI_STATUS    = ;        Status;

    UINTN    &nbs= p;            Index;=

    UINT16    &nb= sp;           IfIndex;

    IP4_CONFIG2_DATA_ITEM *DataItem;<= o:p>

!

  

    IpSb =3D IP4_SERVICE_FROM_IP= 4_CONFIG2_INSTANCE (Instance);

 

    Instance->Signature =3D I= P4_CONFIG2_INSTANCE_SIGNATURE;

 

  

***************

*** 2038,2063 ****

 

    //

    // Try to read the config data fr= om NV variable.

    // If not found, write initialize= d config data into NV variable

    // as a default config data.=

    //

!     Status =3D GetVariable2(Ip= Sb->MacString, &gIp4Config2NvDataGuid, (VOID**)&IfrFromNvData, N= ULL);

!     if(!EFI_ERROR(Status)){

!         if= (IfrFromNvData->Configure =3D=3D TRUE) {

!        &nb= sp;    Status =3D Ip4Config2ReadConfigData (IpSb->MacStri= ng, Instance);

!        &nb= sp;    if (Status =3D=3D EFI_NOT_FOUND) {

!        &nb= sp;        Status =3D Ip4Config2WriteCon= figData (IpSb->MacString, Instance);

!        &nb= sp;    }

!        &nb= sp;    IPConfigEnabled =3D TRUE;

!         }<= o:p>

!         Fr= eePool(IfrFromNvData);

!     }

!     if(!IPConfigEnabled){=

!         St= atus =3D Ip4Config2WriteConfigData (IpSb->MacString, Instance);

!     }

 

    if (EFI_ERROR (Status)) {

      return Status;

    }

 

    Instance->Ip4Config2.SetD= ata            =   =3D EfiIp4Config2SetData;

--- 2037,2052 ----

 

    //

    // Try to read the config data fr= om NV variable.

    // If not found, write initialize= d config data into NV variable

    // as a default config data.=

    //

!   Status =3D Ip4Config2ReadConfigData (I= pSb->MacString, Instance);

!   if (Status =3D=3D EFI_NOT_FOUND) {

!     Status =3D Ip4Config2Write= ConfigData (IpSb->MacString, Instance);

!   }

 

    if (EFI_ERROR (Status)) {

      return Status;

    }

 

    Instance->Ip4Config2.SetD= ata            =   =3D EfiIp4Config2SetData;

--_000_B4DE137BDB63634BAC03BD9DE765F19702B4B34521VENUS1inmegat_--