From: Fu Siyuan Date: Tue, 28 Jun 2016 03:30:04 +0000 (+0800) Subject: NetworkPkg: Stop the HTTP Boot service after the boot image download complete. X-Git-Tag: edk2-stable201903~6413 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=287f05cd1f8cc7ae693868b4882d4cebd87ff6dc;p=mirror_edk2.git NetworkPkg: Stop the HTTP Boot service after the boot image download complete. After boot image has been downloaded, the HTTP boot driver leaves the service in the started state, with an active TCP child. This may cause some problems: 1. The HTTP session may become unavaiable after a while, then a following HTTP Boot will fail. 2. An active TCP child will send RST to any incoming TCP message, which may break other driver which tries to setup a TCP connection. The HTTP boot driver doesn't provide any interface to the boot loader, so it's unnecessary to keep the service running after a boot image is downloaded. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan Reviewed-by: Ye Ting Reviewed-By: Wu Jiaxin --- diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c index 4b850b6628..babd3e6194 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c @@ -505,7 +505,11 @@ HttpBootDxeLoadFile ( Status = EFI_WARN_FILE_SYSTEM; } } - + + // + // Stop the HTTP Boot service after the boot image is downloaded. + // + HttpBootStop (Private); return Status; }