From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on072d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe45::72d]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0D10F1A1E02 for ; Fri, 12 Aug 2016 05:34:34 -0700 (PDT) Received: from AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.25) by AT5PR84MB0290.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Fri, 12 Aug 2016 12:34:30 +0000 Received: from AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM ([10.162.138.25]) by AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM ([10.162.138.25]) with mapi id 15.01.0549.027; Fri, 12 Aug 2016 12:34:30 +0000 From: "Cohen, Eugene" To: "Wu, Jiaxin" , "edk2-devel@lists.01.org" Thread-Topic: IP4 Config Troubles with DHCP Thread-Index: AdHzLtnEw2gfDCBbQ1OtxXknLLKMhQAabX6gABD3ncAAFJsNEAAP+m4gAAm0ZSA= Date: Fri, 12 Aug 2016 12:34:30 +0000 Message-ID: References: <895558F6EA4E3B41AC93A00D163B7274137C5EF1@SHSMSX103.ccr.corp.intel.com> <895558F6EA4E3B41AC93A00D163B7274137C65C5@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <895558F6EA4E3B41AC93A00D163B7274137C65C5@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=eugene@hp.com; x-originating-ip: [174.19.99.119] x-ms-office365-filtering-correlation-id: 47ee4f71-f520-4ec1-06d3-08d3c2ad01f2 x-microsoft-exchange-diagnostics: 1; AT5PR84MB0290; 6:lGIrNcKmvhvswx39YXcRp6HBxBsY5aJ6IIFQlirdsC7TX22NomNLuvQN4TEDVKNyux2xNf+qW1cfSHLGHcKWPvPZQlw2DAIk9NgfgLXK/Krv152c1TYsUNuR6uz6preSjph6D68Jv2dy8fSx6x5NB/pAuzTuzcbBUeXvFFLR4Y7cy9fPa7Qlxvz3fWlbRkEDaWTfOQekS/PqPZ2qZh8BlhImjCCmL9T9TBjeg2YpV2dm+gfaUnl48HNAD1vwaUlK/bYLIaxVhMNNfMUyeL5suCbnYI+vPyaVWaNgq3ZxKoQ=; 5:lSiA34atc09rnfrYwks9MDoMl6QJhmg8jncZjD7CihFnTKE78b2bWuXzk/c4meKLTQAnEwaD831ZD5wFXAfG+PehluMLek+ZLPh/UxuOLtYhIqBXFIy+vEUSIeMbyKCmpTeOH9obeZRUOxWEbMVbEw==; 24:pF9e39rUmX4b7DPnNQ7WDRYub56Z3U7k/TcmxgzJnnG1R7gS48pQrzrEA2LwH+fvWz4qdNPKz9nNEfi/wlPSPl+rDdpRmO51SZm6z6eD6YE=; 7:uJNqR4LcHG0Kg0mfC7hIzPsfV0Mhj28ixdvxS+XJnxKpA8dTd+xLkEP8Og8Bb59nqB8AgFgM2xrzLHTjqtwENfTpXannHToNyggZhhDME3ahgQPxf9+LOWtvnCLRNmmCPMEIozcuP+WbZq7yD4RU2s5pzYZQZ07SCBEd2RZ6cXjaNGjYw5r60fC87MGjOvOns+rMuzyprkGaJYA39DbA0Fsc90Z4ffhC78ZKIHEQUXI= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0290; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:AT5PR84MB0290; BCL:0; PCL:0; RULEID:; SRVR:AT5PR84MB0290; x-forefront-prvs: 003245E729 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(189002)(6602003)(199003)(50986999)(81166006)(2906002)(81156014)(8676002)(76176999)(54356999)(86362001)(92566002)(3660700001)(10400500002)(66066001)(2900100001)(87936001)(3280700002)(11100500001)(2950100001)(77096005)(2501003)(68736007)(6116002)(102836003)(3846002)(586003)(122556002)(105586002)(106356001)(99286002)(101416001)(8936002)(33656002)(9686002)(5002640100001)(7846002)(93886004)(107886002)(305945005)(189998001)(7736002)(7696003)(5001770100001)(74316002)(97736004)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:AT5PR84MB0290; H:AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:; received-spf: None (protection.outlook.com: hp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2016 12:34:30.6280 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0290 Subject: Re: IP4 Config Troubles with DHCP X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 12:34:34 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > Eugene, >=20 > I can reproduce the issue now. And root cause as below: >=20 > #1. Set policy to DHCP. > #2. If DHCP process is not complete yet, then run one App to invoke the > UDP4 Configure with "UseDefaultAddress =3D TRUE" (loop to keep calling > Udp4->Configure until Ip4Mode.IsConfigured changes to TRUE) > #3. Even DHCP succeed but Ip4Mode.IsConfigured flag never set to TRUE = -- > -- failure here!!! >=20 > In step1, the policy will be set to DHCP, and then > Ip4Config2OnPolicyChanged() will be called. In this function, "IpSb- > >Reconfig" flag will be set to TRUE before Ip4StartAutoConfig() called. T= hat > means the original "IpSb->DefaultInterface" will be abandoned/freed once > this DHCP process finished. Detailed see Ip4Config2SetDefaultAddr() > function. >=20 > In step2, UDP4 Configure with "UseDefaultAddress =3D TRUE" is called, tha= t > means the default interface (IpSb->DefaultInterface) will be selected as > current instance's interface. Detailed see Ip4ConfigProtocol() function. >=20 > In step3, When DHCP process finished, as I said in step1, the original "I= pSb- > >DefaultInterface" will be abandoned/freed because "IpSb->Reconfig" flag = is > true. Meanwhile, one new interface is assigned to "IpSb->DefaultInterface= ". > This "IpSb->DefaultInterface" is different to the original one assigned t= o the > UDP4 Configured instance. So, even DHCP process succeed, the up caller wi= ll > never have the chance to get it's truly status. >=20 > I will send one patch to fix this issue later. >=20 > Thanks your reporting. >=20 > Best Regards! > Jiaxin Jiaxin, excellent to hear. I'm glad to hear you've isolated the issue. So= the service binding instance we have in this case is orphaned which explai= ns why destroying it and creating a new one resolves the issue. Of course = we'd be happy to test the patch as soon as it's available. Thank you! Eugene