mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 16:44:10 +02:00
NetworkPkg/HttpDxe: Decofigure Tcp6 before reconfiguring
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2720 Check if the state of the HTTP instance is HTTP_STATE_TCP_CONNECTED, or HTTP_STATE_TCP_CLOSED and de-configure the Tcp6 instance before configuring it again. Signed-off-by: Oliver Steffen <osteffen@redhat.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
38a9afd0fb
commit
3974aa539e
@ -1168,6 +1168,18 @@ HttpConfigureTcp6 (
|
|||||||
Tcp6Option->KeepAliveInterval = HTTP_KEEP_ALIVE_INTERVAL;
|
Tcp6Option->KeepAliveInterval = HTTP_KEEP_ALIVE_INTERVAL;
|
||||||
Tcp6Option->EnableNagle = TRUE;
|
Tcp6Option->EnableNagle = TRUE;
|
||||||
|
|
||||||
|
if ((HttpInstance->State == HTTP_STATE_TCP_CONNECTED) ||
|
||||||
|
(HttpInstance->State == HTTP_STATE_TCP_CLOSED))
|
||||||
|
{
|
||||||
|
Status = HttpInstance->Tcp6->Configure (HttpInstance->Tcp6, NULL);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "HttpConfigureTcp6(NULL) - %r\n", Status));
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
HttpInstance->State = HTTP_STATE_TCP_UNCONFIGED;
|
||||||
|
}
|
||||||
|
|
||||||
Status = HttpInstance->Tcp6->Configure (HttpInstance->Tcp6, Tcp6CfgData);
|
Status = HttpInstance->Tcp6->Configure (HttpInstance->Tcp6, Tcp6CfgData);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((DEBUG_ERROR, "HttpConfigureTcp6 - %r\n", Status));
|
DEBUG ((DEBUG_ERROR, "HttpConfigureTcp6 - %r\n", Status));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user