Skip to content

Commit 0265752

Browse files
authored
Merge pull request #4 from bjsowa/dev-stm32-ignore-dropped-packets
Ignore packets whose buffers were dropped
2 parents a3acf79 + bb367fd commit 0265752

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/portable/NetworkInterface/STM32/NetworkInterface.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,12 @@ static UBaseType_t prvNetworkInterfaceInput( void )
541541
while ( ( HAL_ETH_ReadData( &xEthHandle, ( void ** ) &pxCurDescriptor ) == HAL_OK ) )
542542
{
543543
/*configASSERT( xEthHandle.RxDescList.RxDataLength <= EMAC_DATA_BUFFER_SIZE );*/
544+
if( pxCurDescriptor == NULL )
545+
{
546+
/* Buffer was dropped, ignore packet */
547+
continue;
548+
}
549+
544550
xResult++;
545551
pxCurDescriptor->pxInterface = pxMyInterface;
546552
pxCurDescriptor->pxEndPoint = FreeRTOS_MatchingEndpoint( pxMyInterface, pxCurDescriptor->pucEthernetBuffer );;

0 commit comments

Comments
 (0)