summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c2
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c28
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h2
3 files changed, 18 insertions, 14 deletions
diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
index bc07c185d9..ffcbfed2c5 100644
--- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
+++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
@@ -431,7 +431,7 @@ Udp4CheckTimeout (
//
// TimeoutTick unit is microsecond, MNP_TIMEOUT_CHECK_INTERVAL unit is 100ns.
//
- if (Wrap->TimeoutTick <= (UDP4_TIMEOUT_INTERVAL / 10)) {
+ if (Wrap->TimeoutTick < (UDP4_TIMEOUT_INTERVAL / 10)) {
//
// Remove this RxData if it timeouts.
//
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
index ba8fe5c429..50736a9731 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
@@ -1407,20 +1407,20 @@ EfiPxeBcUdpWrite (
if (SrcPort != NULL) {
Private->CurrentUdpSrcPort = *SrcPort;
}
-
- Status = PxeBcConfigureUdpWriteInstance (
- Udp4,
- &Private->StationIp.v4,
- &Private->SubnetMask.v4,
- &Private->GatewayIp.v4,
- &Private->CurrentUdpSrcPort
- );
- if (EFI_ERROR (Status)) {
- Private->CurrentUdpSrcPort = 0;
- return EFI_INVALID_PARAMETER;
- }
}
+ Status = PxeBcConfigureUdpWriteInstance (
+ Udp4,
+ &Private->StationIp.v4,
+ &Private->SubnetMask.v4,
+ &Private->GatewayIp.v4,
+ &Private->CurrentUdpSrcPort
+ );
+ if (EFI_ERROR (Status)) {
+ Private->CurrentUdpSrcPort = 0;
+ return EFI_INVALID_PARAMETER;
+ }
+
ZeroMem (&Token, sizeof (EFI_UDP4_COMPLETION_TOKEN));
ZeroMem (&Udp4Session, sizeof (EFI_UDP4_SESSION_DATA));
@@ -1492,6 +1492,10 @@ ON_EXIT:
FreePool (Udp4TxData);
+ //
+ // Reset the instance.
+ //
+ Udp4->Configure (Udp4, NULL);
return Status;
}
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
index ddc1eba034..cc771bc5d4 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
@@ -53,7 +53,7 @@ typedef struct _PXEBC_PRIVATE_DATA PXEBC_PRIVATE_DATA;
#define PXEBC_DEFAULT_UDP_OVERHEAD_SIZE 8
#define PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE 4
#define PXEBC_DEFAULT_PACKET_SIZE 1480
-#define PXEBC_DEFAULT_LIFETIME 2000000 // 2 seconds, unit is microsecond
+#define PXEBC_DEFAULT_LIFETIME 50000 // 50ms, unit is microsecond
struct _PXEBC_PRIVATE_DATA {
UINT32 Signature;