REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2031
This patch triggers the RecycleEvent for invalid ARP packets.
Prior to this, we would just ignore invalid ARP packets,
and never free them.
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Nicholas Armour <nicholas.armour@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
/** @file\r
The implementation of the ARP protocol.\r
\r
/** @file\r
The implementation of the ARP protocol.\r
\r
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
//\r
// Restart the receiving if packet size is not correct.\r
//\r
//\r
// Restart the receiving if packet size is not correct.\r
//\r
- goto RESTART_RECEIVE;\r
Head->OpCode = NTOHS (Head->OpCode);\r
\r
if (RxData->DataLength < (sizeof (ARP_HEAD) + 2 * Head->HwAddrLen + 2 * Head->ProtoAddrLen)) {\r
Head->OpCode = NTOHS (Head->OpCode);\r
\r
if (RxData->DataLength < (sizeof (ARP_HEAD) + 2 * Head->HwAddrLen + 2 * Head->ProtoAddrLen)) {\r
- goto RESTART_RECEIVE;\r
}\r
\r
if ((Head->HwType != ArpService->SnpMode.IfType) ||\r
}\r
\r
if ((Head->HwType != ArpService->SnpMode.IfType) ||\r