Skip to content

Commit 5c49ebc

Browse files
committed
Fixed the multicast downlink processing to only allow the reception if FCntDown is in the range of multicast group FCountMin..FCountMax
1 parent 4447cb8 commit 5c49ebc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/mac/LoRaMac.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,19 @@ static void ProcessRadioRxDone( void )
12151215
return;
12161216
}
12171217

1218+
if( multicast == 1 )
1219+
{
1220+
if( ( downLinkCounter < Nvm.MacGroup2.MulticastChannelList[addrID].ChannelParams.FCountMin )||
1221+
( downLinkCounter > Nvm.MacGroup2.MulticastChannelList[addrID].ChannelParams.FCountMax ) )
1222+
{
1223+
// Other errors
1224+
MacCtx.McpsIndication.Status = LORAMAC_EVENT_INFO_STATUS_ERROR;
1225+
MacCtx.McpsIndication.DownLinkCounter = downLinkCounter;
1226+
PrepareRxDoneAbort( );
1227+
return;
1228+
}
1229+
}
1230+
12181231
macCryptoStatus = LoRaMacCryptoUnsecureMessage( addrID, address, fCntID, downLinkCounter, &macMsgData );
12191232
if( macCryptoStatus != LORAMAC_CRYPTO_SUCCESS )
12201233
{

0 commit comments

Comments
 (0)