Skip to content

Commit efdeb93

Browse files
committed
do not let through unicast packets on inactive endpoints
1 parent 3c9140d commit efdeb93

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
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;

0 commit comments

Comments
 (0)