Skip to content

Commit

Permalink
LLC drop a packet if FHSS shedule is not configured.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juha Heiskanen committed Oct 26, 2020
1 parent 7cecc28 commit 1ff9b1d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion source/6LoWPAN/ws/ws_llc_data_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,16 @@ static void ws_llc_mpx_data_request(const mpx_api_t *api, const struct mcps_data
return;
}

if (!base->ie_params.hopping_schedule) {
tr_error("Missing FHSS configurations");
mcps_data_conf_t data_conf;
memset(&data_conf, 0, sizeof(mcps_data_conf_t));
data_conf.msduHandle = data->msduHandle;
data_conf.status = MLME_TRANSACTION_OVERFLOW;
user_cb->data_confirm(&base->mpx_data_base.mpx_api, &data_conf);
return;
}

if (user_id == MPX_KEY_MANAGEMENT_ENC_USER_ID) {
ws_llc_mpx_eapol_request(base, user_cb, data);
} else if (user_id == MPX_LOWPAN_ENC_USER_ID) {
Expand Down Expand Up @@ -1643,10 +1653,11 @@ mpx_api_t *ws_llc_mpx_api_get(struct protocol_interface_info_entry *interface)
int8_t ws_llc_asynch_request(struct protocol_interface_info_entry *interface, asynch_request_t *request)
{
llc_data_base_t *base = ws_llc_discover_by_interface(interface);
if (!base) {
if (!base || !base->ie_params.hopping_schedule) {
return -1;
}


//Calculate IE Buffer size
request->wh_requested_ie_list.fc_ie = false; //Never should not be a part Asynch message
request->wh_requested_ie_list.rsl_ie = false; //Never should not be a part Asynch message
Expand Down

0 comments on commit 1ff9b1d

Please sign in to comment.