Skip to content

Commit 5ddf5fa

Browse files
author
Jarkko Paso
committed
FHSS: prevent unicast on broadcast channel in tx handle
1 parent f17e6cd commit 5ddf5fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,13 @@ static int fhss_ws_tx_handle_callback(const fhss_api_t *api, bool is_broadcast_a
365365
if (!fhss_structure) {
366366
return -1;
367367
}
368-
if (is_broadcast_addr || (fhss_structure->ws->is_on_bc_channel == true)) {
368+
if (is_broadcast_addr) {
369369
return 0;
370370
}
371+
// Do not allow unicast destination on broadcast channel
372+
if (!is_broadcast_addr && (fhss_structure->ws->is_on_bc_channel == true)) {
373+
return -1;
374+
}
371375
// Check TX/RX slot
372376
if (!fhss_ws_check_tx_allowed(fhss_structure)) {
373377
return -1;

0 commit comments

Comments
 (0)