From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1082B941BC9 for ; Thu, 4 Jan 2024 21:00:53 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=7uOs1QYuZvJsKcVkzzLisyBAuWyeDWz59Ojk4/AeXvk=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20140610; t=1704402052; v=1; b=cI1xv/byT7lbXf4QAiusm2J5bkSDnfsCfPb7MmNxvm7gEj+MfpE12e6+1nrtSDsxq9kb7IXc tjJTCqdbrOLLZ/KGMjfc2SfDuXxX/eoxwZ7z3/pIImHglQ2ckENU43F96Zyy87QUP7Rr4yv3BJm fF6YyTctjWMblQuQagm1M4A0= X-Received: by 127.0.0.2 with SMTP id CzLgYY7687511xg4Q0uUDxf9; Thu, 04 Jan 2024 13:00:52 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.6064.1704402051215082710 for ; Thu, 04 Jan 2024 13:00:52 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="376847468" X-IronPort-AV: E=Sophos;i="6.04,331,1695711600"; d="scan'208,217";a="376847468" X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 13:00:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="1027567414" X-IronPort-AV: E=Sophos;i="6.04,331,1695711600"; d="scan'208,217";a="1027567414" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 04 Jan 2024 13:00:50 -0800 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 4 Jan 2024 13:00:49 -0800 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 4 Jan 2024 13:00:49 -0800 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.41) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 4 Jan 2024 13:00:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fng8WhnsOxukC1k7S4G0fJm9hDBP3PMqr7KBi8pWiPl4jlOG6g3Mhfkd5mY7fHJhgybeMjfy8oqRxKsNJiwTxLyvMlf07yqOkqylMIzk2Qz3I2GgqQAjIc2szeTAlaCTb30pXb+GfYys+lnZPoJiNifJ5ZBn1pcyRAVjstR/vdSKGuVxM+fSW+6aZOHinV7lpA/6AGaDnUesOf+KC6wylry8xLCCZ3jyIVlAPoyQp2aDBwGIRJAaET6mz00RgTm9HnQzmuoOu8i9YxfkKvLYpMVQGu5BtLAUT6LE9QsJQUSSCP8bkmsW9szjhm/h9XFPTSFkmiLvQ7KxbSQvC+VVdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r+HxCIb8yJPUE6mk2cRu/OGvEqALMFPhCtxFqiAvijY=; b=cAdbXdl6FdFy/8LcA4TYmFbT6YlBDP186pgdBPUo/l8sfkps1Xr8hlGMd25I4z9E9LuZTIQqxi6GWnk43/JusIPWI6VxZ3ZRDs8iI+uvBG+o3tbA1V2/Ovk80flFaaBm5GkteTzPgVY9uJHlAGFFn3UsnrBPGH7LM11egc0m1TEwzAm2Pj4y+ZPpWo5j6ii/gvDpa92N6NlI9KGSu91ZofWZfluv1NyG1unFJinpqO7EbqOJV1S/zIN0lhV2HTHWfMZsIQWyoFeKgL3B1tqVzK0ugiZ5uYu6rCZcCEvP/bbUOxoLPxa1MFw89CTYrwTMW4izvoIfP+kI1ILgaiA5SA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from SN7PR11MB8281.namprd11.prod.outlook.com (2603:10b6:806:26b::20) by BL1PR11MB5554.namprd11.prod.outlook.com (2603:10b6:208:31d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.15; Thu, 4 Jan 2024 21:00:44 +0000 X-Received: from SN7PR11MB8281.namprd11.prod.outlook.com ([fe80::d2a9:6c81:214f:f89]) by SN7PR11MB8281.namprd11.prod.outlook.com ([fe80::d2a9:6c81:214f:f89%7]) with mapi id 15.20.7159.015; Thu, 4 Jan 2024 21:00:44 +0000 From: "Saloni Kasbekar" To: Ashish Singhal , "devel@edk2.groups.io" , "Clark-williams, Zachary" , Jeff Brasen Subject: Re: [edk2-devel] [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Thread-Topic: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Thread-Index: AQHaLudCf7lKpF50okeBHSbBHqEtirDFRqgAgAHTQECAAVKCgIAB16wQ Date: Thu, 4 Jan 2024 21:00:44 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB8281:EE_|BL1PR11MB5554:EE_ x-ms-office365-filtering-correlation-id: 03723570-c7ce-4880-5b41-08dc0d683802 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 8MVy4jIqXdQhbqkN0tCnuPwLcDWj8SERTi1p5lhYmV73Rlv9N1dw+Ed9iSqPRmVR98pa/Xcayi+ebQqw8TdCM2QOJm258aVtoFzTJrVP4rIdIikG8uFCaauJ/OlPLuTqTF4oNL6YwMaMWWWE6fQZrZUL9SxrcFZXpCEd1s35FtgKnVjRzkhSNeiEGkKpI7hIIenmzt+nMMEFxH3FL+aDgzj2VpTN/D6QGHmkUAO5me3WI8qFZuPzqX14/IhWQ63F67bOL0t6OmJSbpxXQgpUJGDRNq9UzUkc3epoBRZ2HKdXqTfIGIoDvstNZnqHMVTMAqEjYPWvgV3GU0X03q9UrHs9mYkez3ouQq6DLeL6l/hlLJvNjE3xM6PafMxtmVCF4enjzyOzW5dBfxwfXNSoveTAOjws4fgEopnQhETZcJUvsZLmqhER0oWYKJz1urcB9z2Fx6Pi5pdzdHrCvMjqLEQ/CJ/6yEYsqprZJ5vbzGZ3dsLoch6dwYuGXIhOX6AKSxmG3BW/sqZvmN80rGr/HeHSfgaJrl65fRxE/9tiM2WxlEB/7ewact+eQOdnJ4rXT1yU+fGg9kU+fMWhDg5SjoXNs68zy/mven1T4suRHxLHCyvLtuzkNlqbwfZWM+WnWfE5a15tQRbVIwCs6hZyl2syEVHsOuqs++2KXirS3yU= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?NISu0V/Buy/G88jk3BPeciJzjH+OGI70453dVTRnQamoKHmi5eam9sxDN0Ce?= =?us-ascii?Q?J0L3SD3y8V1sMsffEZJ+lDIKiQJtXLbb8HibcuZ2SyEbXZwYJA7QkrxWWogc?= =?us-ascii?Q?aqpJwLbglSxHtXL3noF3IRRYhKw/G6jZhd68j9ZRQGX/Yt8mWff4qknYBNwC?= =?us-ascii?Q?avCPyf10AwBprH4SGB6sa9w33DkYB2RNzxmWN58LkEOJW67KHNUct/e7Q8I2?= =?us-ascii?Q?SB6DZ5pyyhW/nCUnjqzjfyW6yXl5oyQhKg5ERWA+y7MOyrYSo31X8BKzSdgm?= =?us-ascii?Q?T2TpMr4Lc4+AJTcjhEPHamwuaurI9DRcXVG+ACSxCWn0OVycyIKDuhfzqHCZ?= =?us-ascii?Q?y4uud4CPjuqvJH23hQkV/LlVNi/uV+lvZi2PyWwM9FSTjU1iCveUyr2lpOeI?= =?us-ascii?Q?aCbvf6hBIw0lIWpKOJWMarWvAIAUBN8JYsKV6FGfstLDpF59xJ6hUnn651ZR?= =?us-ascii?Q?6i0y+ERWmx0BPBqwQ+LxicVVJQBguCRxF7RiBMSuCCx6C/LmfJP6IClDBhRE?= =?us-ascii?Q?HUN6PM6dMujpEMghJenoaKQIdyEJhZrbCVhEFD8dgNd0+MSFQl3/Ya/rrhRx?= =?us-ascii?Q?Prq3ARWMOTv1jYYwuhEizEfUPhh7PPuH9i6ENwKHeXsENKzPmgoh2xHVBQLT?= =?us-ascii?Q?HAUo6RxeAHKW7y9cR4N7ijbBoLRcdaR9YzLF4PkVJS9si55yqN3sILVnWWNF?= =?us-ascii?Q?KDyP/+llbYRgneLQwD0GhO5EhshW7ihuRBHTuGbnxdeiB14EtSWmuWCylMec?= =?us-ascii?Q?9MHEhbxoiKkWUx/70ql6I0AptFwA2Ib9YDhPExXIorw69KC03qpai3KlxF9s?= =?us-ascii?Q?7mYzClYrmYL5F2PDJYGwy/hvZNzkT1DXNN/vq3FcvtZhCTK/q9KtX7nxjFiZ?= =?us-ascii?Q?3JNQc43HV26mPhMhIj1vOZSCNyfCHy7xFhyLUxlcTom+CLfBd3EC521+0Mw/?= =?us-ascii?Q?yaCRSRwUSd+WUBn3n+NJCM/OW+o33Xg8TeLGaKw4NaIrKycy5k/S6FLslIq7?= =?us-ascii?Q?QMxx8W9L0zKhPYqOsm5JtCzgoIrg01+kP91zTuqSD7lkjv20Mi9jouxxCxfS?= =?us-ascii?Q?/o5tYw55TmHh1s5anKe84QiKl/2qJah2yN4sklOW3znS+3zwkdh6Awvv7DVE?= =?us-ascii?Q?4d4Iko/5DaxWwWZAB8VrUj6H29WPnUY8f8/gVxvl7TlX32U03vnGvMnwGZbB?= =?us-ascii?Q?tusxN7LNygpkcf7OsCfaUG7HSCOYhJnVMoKjxbdK8iIIsywWr7Zr7XjO4ZPQ?= =?us-ascii?Q?1x7ezuA5KFYEhxFJ9Zts62/brW41Da41eAhz0n//2n8E+mLnK5QzalwOQVcF?= =?us-ascii?Q?KM8Xwdq3J7w0gX9tCbayl+e8i92u5/mOGOGA7MVAF1AyRyeBQwKQw4iUXaLq?= =?us-ascii?Q?rYoBBq2UukcTwnEohyZn8WFJVEKzcg7e0QPhCjUAA7gFQ7qqcH77mfRu4g1/?= =?us-ascii?Q?ZP1KsVwGIM3lZdB/rgU85GLljgXnDaeGtCzfPdILvVUDqtGc7Bf3qd1UP58q?= =?us-ascii?Q?Q8yipm4etGVe6Gd40Wlnmkioomo9IzmA1GbGQVOe5B81MyWI6eidiTD/qB5f?= =?us-ascii?Q?GqB6Yw99F8ADg8+V38QEhD1ah9Y/zvZ4ss+LqHRA?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB8281.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03723570-c7ce-4880-5b41-08dc0d683802 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jan 2024 21:00:44.7157 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TZdKuhQALuRFYLmKCHm+4JVoKXn2DdLIRN9brSg/aM4K+x4XN9/DkiQol4bWyhTHJhdtDId65aMgU4RPliu3gUFt8D6gD8wDSuNNIKqRIBQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5554 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,saloni.kasbekar@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: fe0g6qIuIl0EDDdmIm80rAmax7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_SN7PR11MB8281F16EC8C7165AA92B144EF1672SN7PR11MB8281namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="cI1xv/by"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_SN7PR11MB8281F16EC8C7165AA92B144EF1672SN7PR11MB8281namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Makes sense. Should we also set IfrNvData->DhcpEnable =3D TRUE when updatin= g the Policy then? From: Ashish Singhal Sent: Wednesday, January 3, 2024 8:52 AM To: Kasbekar, Saloni ; devel@edk2.groups.io; Cla= rk-williams, Zachary ; Jeff Brasen Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Hello Saloni, Thanks for the feedback. After the reset, or when we disable configure from= menu, GetData returns policy to static as the enum value is 0. However, se= tting value as static does not have any benefit as it forces to reuse the o= ld network settings. Using DHCP really mimics the reset behavior that we se= e without any configuration done manually. Thanks Ashish ________________________________ From: Kasbekar, Saloni > Sent: Tuesday, January 2, 2024 1:47 PM To: Ashish Singhal = >; devel@edk2.groups.io >; Clark-williams, Zachary >; Jeff Brasen > Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default External email: Use caution opening links or attachments Hi Ashish, + Ip4NvData->Policy =3D Ip4Config2PolicyDhcp; + Status =3D Ip4Cfg2->SetData ( + Ip4Cfg2, + Ip4Config2DataTypePolicy, + sizeof (EFI_IP4_CONFIG2_POLICY), + &Ip4NvData->Policy + ); Here we're assuming IfrFormNvData->DhcpEnable is TRUE. Should we check it b= efore setting the policy and calling SetData()? Thanks, Saloni From: Ashish Singhal > Sent: Monday, January 1, 2024 8:48 AM To: devel@edk2.groups.io; Kasbekar, Saloni >; Clark-williams,= Zachary >; Jeff Brasen > Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Hello, Checking again for some feedback on this. Thanks Ashish ________________________________ From: Ashish Singhal > Sent: Thursday, December 14, 2023 4:42 PM To: devel@edk2.groups.io >; saloni.kasbekar@intel.com >; zachary.clark-williams@intel.com >; Jeff Brasen > Cc: Ashish Singhal = > Subject: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default Exercising reset to default does not reset the settings. Add handler code for the case where configuration is disabled. Signed-off-by: Ashish Singhal > --- NetworkPkg/Ip4Dxe/Ip4Config2Nv.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c b/NetworkPkg/Ip4Dxe/Ip4Config= 2Nv.c index e0b6a4d4a9..dac5817b7c 100644 --- a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c +++ b/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c @@ -586,6 +586,31 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( } if (IfrFormNvData->Configure !=3D TRUE) { + if (Ip4NvData->DnsAddress !=3D NULL) { + FreePool (Ip4NvData->DnsAddress); + Ip4NvData->DnsAddress =3D NULL; + Ip4NvData->DnsAddressCount =3D 0; + } + + if (Ip4NvData->GatewayAddress !=3D NULL) { + FreePool (Ip4NvData->GatewayAddress); + Ip4NvData->GatewayAddress =3D NULL; + Ip4NvData->GatewayAddressCount =3D 0; + } + + if (Ip4NvData->ManualAddress !=3D NULL) { + FreePool (Ip4NvData->ManualAddress); + Ip4NvData->ManualAddress =3D NULL; + Ip4NvData->ManualAddressCount =3D 0; + } + + Ip4NvData->Policy =3D Ip4Config2PolicyDhcp; + Status =3D Ip4Cfg2->SetData ( + Ip4Cfg2, + Ip4Config2DataTypePolicy, + sizeof (EFI_IP4_CONFIG2_POLICY), + &Ip4NvData->Policy + ); return EFI_SUCCESS; } -- 2.17.1 Hello, Hello Saloni, -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113200): https://edk2.groups.io/g/devel/message/113200 Mute This Topic: https://groups.io/mt/103181314/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_SN7PR11MB8281F16EC8C7165AA92B144EF1672SN7PR11MB8281namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Makes sense. Should we also set IfrNvData->DhcpEn= able =3D TRUE when updating the Policy then?

 

From: Ashish Singhal <ashishsingha@nvidia.= com>
Sent: Wednesday, January 3, 2024 8:52 AM
To: Kasbekar, Saloni <saloni.kasbekar@intel.com>; devel@edk2.g= roups.io; Clark-williams, Zachary <zachary.clark-williams@intel.com>;= Jeff Brasen <jbrasen@nvidia.com>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

 

Hello Saloni,

 

Thanks for the feedback. After the reset, or when we disab= le configure from menu, GetData returns policy to static as the enum value = is 0. However, setting value as static does not have any benefit as it forces to reuse the old network settings. Using DHC= P really mimics the reset behavior that we see without any configuration do= ne manually.

 

Thanks

Ashish

 


From: Kasbekar, Saloni <saloni.kasbekar@intel.com>
Sent: Tuesday, January 2, 2024 1:47 PM
To: Ashish Singhal <as= hishsingha@nvidia.com>; devel@edk2.groups.io <devel@edk2.groups.io>; Clark-willi= ams, Zachary <zachar= y.clark-williams@intel.com>; Jeff Brasen <jbrasen@nvidia.com>
Subject: RE: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default =

 

External email: Use caution opening l= inks or attachments

 

Hi Ashish,

 

+    Ip4NvData->Policy =3D Ip4Con= fig2PolicyDhcp;

+    Status    &= nbsp;       =3D Ip4Cfg2->SetData (

+        &n= bsp;            = ;            &n= bsp; Ip4Cfg2,

+        &n= bsp;            = ;            &n= bsp; Ip4Config2DataTypePolicy,

+        &n= bsp;            = ;            &n= bsp; sizeof (EFI_IP4_CONFIG2_POLICY),

+        &n= bsp;            = ;            &n= bsp; &Ip4NvData->Policy

+        &n= bsp;            = ;            &n= bsp; );

 

Here we’re assuming IfrFormNvData->DhcpEna= ble is TRUE. Should we check it before setting the policy and calling SetDa= ta()?

 

Thanks,

Saloni

 

 

From: Ashish Singhal <ashishsingha@nvidia.com>
Sent: Monday, January 1, 2024 8:48 AM
To: devel@edk2.groups.io= ; Kasbekar, Saloni <saloni.= kasbekar@intel.com>; Clark-williams, Zachary <zachary.clark-williams@intel.com>; Jeff Brasen <jbrasen@nvidia.com>
Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

 

Hello,

 

Checking again for some feedback on this.

 

Thanks

Ashish

 


Exercising reset to = default does not reset the settings.
Add handler code for the case where configuration is
disabled.

Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
---
 NetworkPkg/Ip4Dxe/Ip4Config2Nv.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c b/NetworkPkg/Ip4Dxe/Ip4Config= 2Nv.c
index e0b6a4d4a9..dac5817b7c 100644
--- a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c
+++ b/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c
@@ -586,6 +586,31 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
   }
 
   if (IfrFormNvData->Configure !=3D TRUE) {
+    if (Ip4NvData->DnsAddress !=3D NULL) {
+      FreePool (Ip4NvData->DnsAddress);
+      Ip4NvData->DnsAddress   &= nbsp;  =3D NULL;
+      Ip4NvData->DnsAddressCount =3D 0;
+    }
+
+    if (Ip4NvData->GatewayAddress !=3D NULL) {
+      FreePool (Ip4NvData->GatewayAddress); +      Ip4NvData->GatewayAddress  &nb= sp;   =3D NULL;
+      Ip4NvData->GatewayAddressCount =3D 0; +    }
+
+    if (Ip4NvData->ManualAddress !=3D NULL) {
+      FreePool (Ip4NvData->ManualAddress);
+      Ip4NvData->ManualAddress  &nbs= p;   =3D NULL;
+      Ip4NvData->ManualAddressCount =3D 0;
+    }
+
+    Ip4NvData->Policy =3D Ip4Config2PolicyDhcp;
+    Status        &= nbsp;   =3D Ip4Cfg2->SetData (
+            &n= bsp;            = ;          Ip4Cfg2,
+            &n= bsp;            = ;          Ip4Config2DataTypeP= olicy,
+            &n= bsp;            = ;          sizeof (EFI_IP4_CON= FIG2_POLICY),
+            &n= bsp;            = ;          &Ip4NvData->= Policy
+            &n= bsp;            = ;          );
     return EFI_SUCCESS;
   }
 
--
2.17.1

Hello,

Hello Saloni,

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#113200) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_SN7PR11MB8281F16EC8C7165AA92B144EF1672SN7PR11MB8281namp_--