Skip to content

Commit 5df4d80

Browse files
authored
Merge branch 'main' into bugfix-atsame5x-icmp
2 parents 801c7d7 + fa073ea commit 5df4d80

File tree

6 files changed

+17
-15
lines changed

6 files changed

+17
-15
lines changed

source/FreeRTOS_IPv4.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,7 @@ enum eFrameProcessingResult prvAllowIPPacketIPv4( const struct xIP_PACKET * cons
321321
( FreeRTOS_FindEndPointOnIP_IPv4( ulDestinationIPAddress ) == NULL ) &&
322322
/* Is it an IPv4 broadcast address x.x.x.255 ? */
323323
( ( FreeRTOS_ntohl( ulDestinationIPAddress ) & 0xffU ) != 0xffU ) &&
324-
( xIsIPv4Multicast( ulDestinationIPAddress ) == pdFALSE ) &&
325-
/* Or (during DHCP negotiation) we have no IP-address yet? */
326-
( FreeRTOS_IsNetworkUp() != pdFALSE ) )
324+
( xIsIPv4Multicast( ulDestinationIPAddress ) == pdFALSE ) )
327325
{
328326
/* Packet is not for this node, release it */
329327
eReturn = eReleaseBuffer;

source/FreeRTOS_Routing.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ struct xIPv6_Couple
388388
#endif
389389
{
390390
if( ( ulIPAddress == 0U ) ||
391-
( pxEndPoint->ipv4_settings.ulIPAddress == 0U ) ||
392391
( pxEndPoint->ipv4_settings.ulIPAddress == ulIPAddress ) )
393392
{
394393
break;

source/portable/NetworkInterface/RX/NetworkInterface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of
1313
* this software. By using this software, you agree to the additional terms and conditions found by accessing the
1414
* following link:
15-
* http://www.renesas.com/disclaimer
15+
* https://www.renesas.com/en/document/oth/disclaimer8
1616
*
1717
* Copyright (C) 2020 Renesas Electronics Corporation. All rights reserved.
1818
***********************************************************************************************************************/

source/portable/NetworkInterface/RX/ether_callback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of
1313
* this software. By using this software, you agree to the additional terms and conditions found by accessing the
1414
* following link:
15-
* http://www.renesas.com/disclaimer
15+
* https://www.renesas.com/en/document/oth/disclaimer8
1616
*
1717
* Copyright (C) 2015 Renesas Electronics Corporation. All rights reserved.
1818
***********************************************************************************************************************/

test/unit-test/FreeRTOS_IPv4/FreeRTOS_IPv4_utest.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ void test_prvAllowIPPacketIPv4_NotMatchingIP( void )
262262
pxIPHeader->ulDestinationIPAddress = pxEndpoint->ipv4_settings.ulIPAddress + 1;
263263

264264
FreeRTOS_FindEndPointOnIP_IPv4_ExpectAnyArgsAndReturn( NULL ); /* From prvAllowIPPacketIPv4() */
265-
FreeRTOS_IsNetworkUp_ExpectAndReturn( pdTRUE );
266265

267266
eResult = prvAllowIPPacketIPv4( pxIPPacket, pxNetworkBuffer, uxHeaderLength );
268267

@@ -417,7 +416,6 @@ void test_prvAllowIPPacketIPv4_SourceIPBrdCast_NoLocalIP( void )
417416

418417

419418
FreeRTOS_FindEndPointOnIP_IPv4_ExpectAnyArgsAndReturn( NULL ); /* From prvAllowIPPacketIPv4() */
420-
FreeRTOS_IsNetworkUp_ExpectAndReturn( pdFALSE );
421419

422420
eResult = prvAllowIPPacketIPv4( pxIPPacket, pxNetworkBuffer, uxHeaderLength );
423421

@@ -455,7 +453,6 @@ void test_prvAllowIPPacketIPv4_DestMACBrdCast_DestIPUnicast( void )
455453

456454

457455
FreeRTOS_FindEndPointOnIP_IPv4_ExpectAnyArgsAndReturn( NULL ); /* From prvAllowIPPacketIPv4() */
458-
FreeRTOS_IsNetworkUp_ExpectAndReturn( pdTRUE );
459456

460457
eResult = prvAllowIPPacketIPv4( pxIPPacket, pxNetworkBuffer, uxHeaderLength );
461458

test/unit-test/FreeRTOS_Routing/FreeRTOS_Routing_utest.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,25 +1440,33 @@ void test_FreeRTOS_FindEndPointOnIP_IPv4_AnyEndpoint( void )
14401440
* pxNetworkEndPoints is a global variable using in FreeRTOS_Routing as link list head of all endpoints.
14411441
*
14421442
* Test step:
1443-
* - Create 1 endpoint with IP address 0 and add it to the list.
1444-
* - Call FreeRTOS_FindEndPointOnIP_IPv4 to query with IPV4_DEFAULT_ADDRESS.
1443+
* - Create 1 endpoint with IP address 0xAB12CD34 and add it to the list.
1444+
* - Call FreeRTOS_FindEndPointOnIP_IPv4 to query with 0xAB12CD34.
14451445
* - Check if returned endpoint is same.
1446-
* - Call FreeRTOS_FindEndPointOnIP_IPv4 to query with IPV4_DEFAULT_GATEWAY.
1446+
* - Call FreeRTOS_FindEndPointOnIP_IPv4 to query with 0.
14471447
* - Check if returned endpoint is same.
1448+
* - Call FreeRTOS_FindEndPointOnIP_IPv4 to query with IPV4_DEFAULT_ADDRESS.
1449+
* - Check if returned endpoint is NULL.
1450+
* - Call FreeRTOS_FindEndPointOnIP_IPv4 to query with IPV4_DEFAULT_GATEWAY.
1451+
* - Check if returned endpoint is NULL.
14481452
*/
14491453
void test_FreeRTOS_FindEndPointOnIP_IPv4_ZeroAddressEndpoint( void )
14501454
{
14511455
NetworkEndPoint_t xEndPoint;
14521456
NetworkEndPoint_t * pxEndPoint = NULL;
14531457

14541458
memset( &xEndPoint, 0, sizeof( NetworkEndPoint_t ) );
1455-
xEndPoint.ipv4_settings.ulIPAddress = 0;
1459+
xEndPoint.ipv4_settings.ulIPAddress = 0xAB12CD34;
14561460
pxNetworkEndPoints = &xEndPoint;
14571461

1458-
pxEndPoint = FreeRTOS_FindEndPointOnIP_IPv4( IPV4_DEFAULT_ADDRESS );
1462+
pxEndPoint = FreeRTOS_FindEndPointOnIP_IPv4( 0xAB12CD34 );
14591463
TEST_ASSERT_EQUAL( &xEndPoint, pxEndPoint );
1460-
pxEndPoint = FreeRTOS_FindEndPointOnIP_IPv4( IPV4_DEFAULT_GATEWAY );
1464+
pxEndPoint = FreeRTOS_FindEndPointOnIP_IPv4( 0 );
14611465
TEST_ASSERT_EQUAL( &xEndPoint, pxEndPoint );
1466+
pxEndPoint = FreeRTOS_FindEndPointOnIP_IPv4( IPV4_DEFAULT_ADDRESS );
1467+
TEST_ASSERT_EQUAL( NULL, pxEndPoint );
1468+
pxEndPoint = FreeRTOS_FindEndPointOnIP_IPv4( IPV4_DEFAULT_GATEWAY );
1469+
TEST_ASSERT_EQUAL( NULL, pxEndPoint );
14621470
}
14631471

14641472
/**

0 commit comments

Comments
 (0)