audk/NetworkPkg
Mike Beaton 73dbb68006 NetworkPkg/HttpBootDxe: Correctly uninstall HttpBootCallbackProtocol
The existing HttpBootUninstallCallback was passing the wrong handle (the
PrivateData root controller handle, not the correct child IPv4 or IPv6
NIC controller handle; cf HttpBootInstallCallback for matching logic) and
was also passing the address of a pointer to the interface to be removed
rather than the pointer itself, so always failed with EFI_NOT_FOUND.

This resulted in the prior behaviour that if multiple HTTP boot attempts
were made, on the second and subsequent attempts the instance of this
protocol installed by the first attempt would be re-used. As long as only
one driver using the protocol is installed, this ends up producing the
same results as if the protocol had been uninstalled then reinstalled
correctly.

After this commit, the protocol is installed at the start of an HTTP boot
attempt and uninstalled it at the end of it (assuming nothing else has
accessed the protocol in a way which blocks the uninstall).

It might seem attractive to add an ASSERT to confirm when debugging
that the uninstall succeeds as expected, but this is recommended against
because uninstallation of protocol interfaces is allowed to fail under
the UEFI model:
https://edk2.groups.io/g/devel/message/117469.
An ASSERT could therefore arise from a sequence of events which is
perfectly valid - or at least is out of the control of this driver.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-09-15 21:18:08 +00:00
..
Application/VConfig
ArpDxe
Dhcp4Dxe
Dhcp6Dxe
DnsDxe
DpcDxe
HttpBootDxe NetworkPkg/HttpBootDxe: Correctly uninstall HttpBootCallbackProtocol 2024-09-15 21:18:08 +00:00
HttpDxe
HttpUtilitiesDxe
IScsiDxe
Include
Ip4Dxe
Ip6Dxe
Library MdePkg: Move PcdEnforceSecureRngAlgorithms from NetworkPkg 2024-09-13 14:34:21 +00:00
MnpDxe NetworkPkg/MnpDxe: Convert TX buffer allocation messages to DEBUG_VERBOSE 2024-09-11 19:32:39 +00:00
Mtftp4Dxe
Mtftp6Dxe
SnpDxe
TcpDxe
Test NetworkPkg: Add StackCheckLib 2024-09-13 03:58:46 +00:00
TlsAuthConfigDxe
TlsDxe
Udp4Dxe
Udp6Dxe
UefiPxeBcDxe NetworkPkg: PxeBcDhcp6GoogleTest: Fix Stack Smashing Unit Test 2024-09-13 03:58:46 +00:00
VlanConfigDxe
WifiConnectionManagerDxe NetworkPkg/WifiConnectionManagerDxe: Fix Connection Manager HII errors 2024-09-03 06:24:43 +00:00
Network.dsc.inc
Network.fdf.inc
NetworkBuildOptions.dsc.inc
NetworkComponents.dsc.inc
NetworkDefines.dsc.inc
NetworkLibs.dsc.inc
NetworkPcds.dsc.inc NetworkPkg: Fix unable to build OVMF with -D NETWORK_ENABLE=0 2024-09-12 21:34:33 +00:00
NetworkPkg.ci.yaml NetworkPkg/NetworkPkg.ci.yaml: Add PrEval CI config 2024-09-02 23:20:35 +00:00
NetworkPkg.dec MdePkg: Move PcdEnforceSecureRngAlgorithms from NetworkPkg 2024-09-13 14:34:21 +00:00
NetworkPkg.dsc NetworkPkg: Add StackCheckLib 2024-09-13 03:58:46 +00:00
NetworkPkg.uni
NetworkPkgExtra.uni
SecurityFixes.yaml