mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 23:54:02 +02:00
NetworkPkg: Remove redundant check in PXE driver.
The IP protocol has been configured to only receive ICMP packet in PXE driver. So this patch removes the unnecessary check for NextHeader field and replace it with ASSERT. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
parent
c7285227e7
commit
673abfb749
@ -280,13 +280,10 @@ PxeBcIcmpErrorDpcHandle (
|
|||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RxData->Header->Protocol != EFI_IP_PROTO_ICMP) {
|
|
||||||
//
|
//
|
||||||
// The protocol value in the header of the receveid packet should be EFI_IP_PROTO_ICMP.
|
// The protocol has been configured to only receive ICMP packet.
|
||||||
//
|
//
|
||||||
gBS->SignalEvent (RxData->RecycleSignal);
|
ASSERT (RxData->Header->Protocol == EFI_IP_PROTO_ICMP);
|
||||||
goto ON_EXIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
Type = *((UINT8 *) RxData->FragmentTable[0].FragmentBuffer);
|
Type = *((UINT8 *) RxData->FragmentTable[0].FragmentBuffer);
|
||||||
|
|
||||||
@ -416,13 +413,10 @@ PxeBcIcmp6ErrorDpcHandle (
|
|||||||
goto ON_EXIT;
|
goto ON_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RxData->Header->NextHeader != IP6_ICMP) {
|
|
||||||
//
|
//
|
||||||
// The nextheader in the header of the receveid packet should be IP6_ICMP.
|
// The protocol has been configured to only receive ICMP packet.
|
||||||
//
|
//
|
||||||
gBS->SignalEvent (RxData->RecycleSignal);
|
ASSERT (RxData->Header->NextHeader == IP6_ICMP);
|
||||||
goto ON_EXIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
Type = *((UINT8 *) RxData->FragmentTable[0].FragmentBuffer);
|
Type = *((UINT8 *) RxData->FragmentTable[0].FragmentBuffer);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user