Skip to content

Commit b4b37db

Browse files
committed
Add filter to handle multicast downlinks exceptions.
The Multicast frames share most of the unicast frame format with a few exceptions: • They are not allowed to carry MAC commands, neither in the FOpt field, nor in the payload on port 0 because a multicast downlink does not have the same authentication robustness as a unicast frame. • The ACK and ADRACKReq bits MUST be zero. The MType field MUST carry the value for Unconfirmed Data Down.
1 parent 156b1b9 commit b4b37db

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/mac/LoRaMac.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,16 @@ static void ProcessRadioRxDone( void )
11171117
}
11181118
}
11191119

1120+
// Filter messages according to multicast downlink exceptions
1121+
if( ( multicast == 1 ) && ( ( fType != FRAME_TYPE_D ) ||
1122+
( macMsgData.FHDR.FCtrl.Bits.Ack == true ) ||
1123+
( macMsgData.FHDR.FCtrl.Bits.AdrAckReq == true ) ) )
1124+
{
1125+
MacCtx.McpsIndication.Status = LORAMAC_EVENT_INFO_STATUS_ERROR;
1126+
PrepareRxDoneAbort( );
1127+
return;
1128+
}
1129+
11201130
// Get maximum allowed counter difference
11211131
getPhy.Attribute = PHY_MAX_FCNT_GAP;
11221132
phyParam = RegionGetPhyParam( MacCtx.NvmCtx->Region, &getPhy );

0 commit comments

Comments
 (0)