Skip to content

Commit 9346a7e

Browse files
author
Cruz Monrreal
authored
Merge pull request #7935 from kivaisan/fix_invalid_mac_command_case
LoRa: Stop processing MAC commands if command id is unknown
2 parents 1cd9e91 + f24623a commit 9346a7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/lorawan/lorastack/mac/LoRaMacCommand.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ lorawan_status_t LoRaMacCommand::process_mac_commands(const uint8_t *payload, ui
304304
break;
305305
default:
306306
// Unknown command. ABORT MAC commands processing
307-
ret_value = LORAWAN_STATUS_UNSUPPORTED;
307+
tr_error("Invalid MAC command (0x%X)!", payload[mac_index]);
308+
return LORAWAN_STATUS_UNSUPPORTED;
308309
}
309310
}
310311
return ret_value;

0 commit comments

Comments
 (0)