layer2: handle invalid message types just in case

This commit is contained in:
Simon Ruderich 2024-07-23 09:24:32 +02:00
parent fe3460a899
commit 4e2815923c

View file

@ -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) {