Lora-net / SWL2001

LoRa Basics Modem LoRaWAN stack
BSD 3-Clause Clear License
104 stars 60 forks source link

The stack hangs when an undefined command is received. #14

Closed Ramin-Mardani closed 9 months ago

Ramin-Mardani commented 1 year ago

https://github.com/Lora-net/SWL2001/blob/45e19e5bf783bf874b8c9825b76c4c5befa8bcba/smtc_modem_core/lorawan_packages/fuota_packages/lorawan_remote_multicast_setup_package.c#L685

The stack hangs inside the function above when I send a command that is not defined by the LoRaWAN specification on Port 200. For example, command 0x06 without any payload. Please refer to "LoRaWAN® Remote Multicast Setup Specification TS005"

I guess it is because of the missing default in the function mentioned above.

MpmTwtg commented 1 year ago

This also happens in:

https://github.com/Lora-net/SWL2001/blob/45e19e5bf783bf874b8c9825b76c4c5befa8bcba/smtc_modem_core/lorawan_packages/fuota_packages/lorawan_fmp_package.c#L479

https://github.com/Lora-net/SWL2001/blob/45e19e5bf783bf874b8c9825b76c4c5befa8bcba/smtc_modem_core/lorawan_packages/fuota_packages/lorawan_fragmentation_package.c#L397

And the same for the fuota_packages_v2 package

lbm-team commented 1 year ago

Thank you for your feedback, this issue will be fixed in the next release

lbm-team commented 9 months ago

Hi @Ramin-Mardani, @MpmTwtg

This issue is now fixed in new v4.3.0 release and mentioned in CHANGELOG.

Once more thanks for your report