Skip to content

Commit 1ff9b1d

Browse files
author
Juha Heiskanen
committed
LLC drop a packet if FHSS shedule is not configured.
1 parent 7cecc28 commit 1ff9b1d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

source/6LoWPAN/ws/ws_llc_data_service.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,16 @@ static void ws_llc_mpx_data_request(const mpx_api_t *api, const struct mcps_data
12591259
return;
12601260
}
12611261

1262+
if (!base->ie_params.hopping_schedule) {
1263+
tr_error("Missing FHSS configurations");
1264+
mcps_data_conf_t data_conf;
1265+
memset(&data_conf, 0, sizeof(mcps_data_conf_t));
1266+
data_conf.msduHandle = data->msduHandle;
1267+
data_conf.status = MLME_TRANSACTION_OVERFLOW;
1268+
user_cb->data_confirm(&base->mpx_data_base.mpx_api, &data_conf);
1269+
return;
1270+
}
1271+
12621272
if (user_id == MPX_KEY_MANAGEMENT_ENC_USER_ID) {
12631273
ws_llc_mpx_eapol_request(base, user_cb, data);
12641274
} else if (user_id == MPX_LOWPAN_ENC_USER_ID) {
@@ -1643,10 +1653,11 @@ mpx_api_t *ws_llc_mpx_api_get(struct protocol_interface_info_entry *interface)
16431653
int8_t ws_llc_asynch_request(struct protocol_interface_info_entry *interface, asynch_request_t *request)
16441654
{
16451655
llc_data_base_t *base = ws_llc_discover_by_interface(interface);
1646-
if (!base) {
1656+
if (!base || !base->ie_params.hopping_schedule) {
16471657
return -1;
16481658
}
16491659

1660+
16501661
//Calculate IE Buffer size
16511662
request->wh_requested_ie_list.fc_ie = false; //Never should not be a part Asynch message
16521663
request->wh_requested_ie_list.rsl_ie = false; //Never should not be a part Asynch message

0 commit comments

Comments
 (0)