diff options
-rw-r--r-- | NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c index 720287583e..47bb7c5dbb 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c @@ -257,8 +257,7 @@ PxeBcIcmpErrorDpcHandle ( //
// The return status should be recognized as EFI_ICMP_ERROR.
//
- gBS->SignalEvent (RxData->RecycleSignal);
- goto ON_EXIT;
+ goto ON_RECYCLE;
}
if (EFI_IP4 (RxData->Header->SourceAddress) != 0 &&
@@ -268,16 +267,14 @@ PxeBcIcmpErrorDpcHandle ( //
// The source address of the received packet should be a valid unicast address.
//
- gBS->SignalEvent (RxData->RecycleSignal);
- goto ON_EXIT;
+ goto ON_RECYCLE;
}
if (!EFI_IP4_EQUAL (&RxData->Header->DestinationAddress, &Mode->StationIp.v4)) {
//
// The destination address of the received packet should be equal to the host address.
//
- gBS->SignalEvent (RxData->RecycleSignal);
- goto ON_EXIT;
+ goto ON_RECYCLE;
}
//
@@ -295,8 +292,7 @@ PxeBcIcmpErrorDpcHandle ( //
// The type of the receveid ICMP message should be ICMP_ERROR_MESSAGE.
//
- gBS->SignalEvent (RxData->RecycleSignal);
- goto ON_EXIT;
+ goto ON_RECYCLE;
}
//
@@ -323,6 +319,9 @@ PxeBcIcmpErrorDpcHandle ( IcmpError += CopiedLen;
}
+ON_RECYCLE:
+ gBS->SignalEvent (RxData->RecycleSignal);
+
ON_EXIT:
Private->IcmpToken.Status = EFI_NOT_READY;
Ip4->Receive (Ip4, &Private->IcmpToken);
@@ -392,16 +391,14 @@ PxeBcIcmp6ErrorDpcHandle ( //
// The return status should be recognized as EFI_ICMP_ERROR.
//
- gBS->SignalEvent (RxData->RecycleSignal);
- goto ON_EXIT;
+ goto ON_RECYCLE;
}
if (!NetIp6IsValidUnicast (&RxData->Header->SourceAddress)) {
//
// The source address of the received packet should be a valid unicast address.
//
- gBS->SignalEvent (RxData->RecycleSignal);
- goto ON_EXIT;
+ goto ON_RECYCLE;
}
if (!NetIp6IsUnspecifiedAddr (&Mode->StationIp.v6) &&
@@ -409,8 +406,7 @@ PxeBcIcmp6ErrorDpcHandle ( //
// The destination address of the received packet should be equal to the host address.
//
- gBS->SignalEvent (RxData->RecycleSignal);
- goto ON_EXIT;
+ goto ON_RECYCLE;
}
//
@@ -427,8 +423,7 @@ PxeBcIcmp6ErrorDpcHandle ( //
// The type of the receveid packet should be an ICMP6 error message.
//
- gBS->SignalEvent (RxData->RecycleSignal);
- goto ON_EXIT;
+ goto ON_RECYCLE;
}
//
@@ -455,6 +450,9 @@ PxeBcIcmp6ErrorDpcHandle ( Icmp6Error += CopiedLen;
}
+ON_RECYCLE:
+ gBS->SignalEvent (RxData->RecycleSignal);
+
ON_EXIT:
Private->Icmp6Token.Status = EFI_NOT_READY;
Ip6->Receive (Ip6, &Private->Icmp6Token);
|