From 8400187c281898230a7a36e6cdd4b80bda7a4301 Mon Sep 17 00:00:00 2001 From: ActoryOu Date: Wed, 28 Jun 2023 09:35:27 +0000 Subject: [PATCH] Revert length check in IPv6 RX packets --- source/FreeRTOS_IPv6.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/FreeRTOS_IPv6.c b/source/FreeRTOS_IPv6.c index 701f8ef2f1..33076e6e90 100644 --- a/source/FreeRTOS_IPv6.c +++ b/source/FreeRTOS_IPv6.c @@ -132,9 +132,7 @@ const struct xIPv6_Address FreeRTOS_in6addr_loopback = { { 0, 0, 0, 0, 0, 0, 0, /* Check if the complete IPv6-header plus protocol data have been transferred: */ usPayloadLength = FreeRTOS_ntohs( pxIPv6Packet->xIPHeader.usPayloadLength ); - /* Since network interface might put some data in the network buffer, - * we allow buffer length to be greater than necessary. */ - if( uxBufferLength < ( size_t ) ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv6_HEADER + ( size_t ) usPayloadLength ) ) + if( uxBufferLength != ( size_t ) ( ipSIZE_OF_ETH_HEADER + ipSIZE_OF_IPv6_HEADER + ( size_t ) usPayloadLength ) ) { DEBUG_SET_TRACE_VARIABLE( xLocation, 4 ); break;