diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2015-08-18 03:08:27 +0000 |
---|---|---|
committer | jiaxinwu <jiaxinwu@Edk2> | 2015-08-18 03:08:27 +0000 |
commit | 36673054200c24a38bedea10e19765830bd2ad2c (patch) | |
tree | 22ffddbb823a9354bdf0b1bc0ed06c01052c0139 /NetworkPkg/HttpBootDxe | |
parent | 71028ba2c4c398d70475504e671d048d9003d90f (diff) | |
download | edk2-platforms-36673054200c24a38bedea10e19765830bd2ad2c.tar.xz |
NetworkPkg: Stop and release DHCP4 child after boot info is ready
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
Diffstat (limited to 'NetworkPkg/HttpBootDxe')
-rw-r--r-- | NetworkPkg/HttpBootDxe/HttpBootImpl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c index 711cc3c8c5..920761e331 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c @@ -244,6 +244,12 @@ HttpBootStop ( 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); @@ -338,6 +344,12 @@ HttpBootDxeLoadFile ( 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); } return Status; |