HttpBootDxe need to stop and release the DHCP4 child when it's
not used so the NBP could create new DHCP4 child and use it.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18231
6f19259b-4bc3-4df7-8a09-
765794883524
Private->SelectProxyType = HttpOfferTypeMax;
if (!Private->UsingIpv6) {
Private->SelectProxyType = HttpOfferTypeMax;
if (!Private->UsingIpv6) {
+ //
+ // Stop and release the DHCP4 child.
+ //
+ Private->Dhcp4->Stop (Private->Dhcp4);
+ Private->Dhcp4->Configure (Private->Dhcp4, NULL);
+
for (Index = 0; Index < HTTP_BOOT_OFFER_MAX_NUM; Index++) {
if (Private->OfferBuffer[Index].Dhcp4.UriParser) {
HttpUrlFreeParser (Private->OfferBuffer[Index].Dhcp4.UriParser);
for (Index = 0; Index < HTTP_BOOT_OFFER_MAX_NUM; Index++) {
if (Private->OfferBuffer[Index].Dhcp4.UriParser) {
HttpUrlFreeParser (Private->OfferBuffer[Index].Dhcp4.UriParser);
if (Status != EFI_SUCCESS && Status != EFI_BUFFER_TOO_SMALL) {
HttpBootStop (Private);
if (Status != EFI_SUCCESS && Status != EFI_BUFFER_TOO_SMALL) {
HttpBootStop (Private);
+ } else {
+ //
+ // Stop and release the DHCP4 child.
+ //
+ Private->Dhcp4->Stop (Private->Dhcp4);
+ Private->Dhcp4->Configure (Private->Dhcp4, NULL);