layer2: handle invalid message types just in case
This commit is contained in:
parent
fe3460a899
commit
4e2815923c
|
@ -64,6 +64,10 @@ result_t layer2_rx_handle_packet(layer2_rx_t *ctx, const uint8_t *buf, size_t bu
|
|||
|
||||
case L2_MSG_TYPE_DATA:
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG(LVL_ERR, "Invalid message type %d.", header.msg_type);
|
||||
return ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
if(ctx->next_expected_seq != header.tx_seq_nr) {
|
||||
|
|
Loading…
Reference in a new issue