From 2e83b80486debc40a77437e0b7d8b95f3cd3ea2f Mon Sep 17 00:00:00 2001 From: Vishwanath Martur <64204611+vishwamartur@users.noreply.github.com> Date: Sun, 3 Nov 2024 14:27:56 +0530 Subject: [PATCH] Fix dropping of IPv6 packets with unspecified source address Related to #1124 Remove the check for the source address being `::` in `prvAllowIPPacketIPv6` function. * Update the comment to reflect that only the destination address is checked. * Allow IPv6 packets with a source address of `::` to be processed further. --- source/FreeRTOS_IPv6.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/FreeRTOS_IPv6.c b/source/FreeRTOS_IPv6.c index 0e8f85ea1..5ff703bdf 100644 --- a/source/FreeRTOS_IPv6.c +++ b/source/FreeRTOS_IPv6.c @@ -499,9 +499,8 @@ eFrameProcessingResult_t prvAllowIPPacketIPv6( const IPHeader_IPv6_t * const pxI BaseType_t xHasUnspecifiedAddress = pdFALSE; /* Drop if packet has unspecified IPv6 address (defined in RFC4291 - sec 2.5.2) - * either in source or destination address. */ - if( ( memcmp( pxDestinationIPAddress->ucBytes, FreeRTOS_in6addr_any.ucBytes, sizeof( IPv6_Address_t ) ) == 0 ) || - ( memcmp( pxSourceIPAddress->ucBytes, FreeRTOS_in6addr_any.ucBytes, sizeof( IPv6_Address_t ) ) == 0 ) ) + * in destination address. */ + if( memcmp( pxDestinationIPAddress->ucBytes, FreeRTOS_in6addr_any.ucBytes, sizeof( IPv6_Address_t ) ) == 0 ) { xHasUnspecifiedAddress = pdTRUE; }