TSCH: log parsing errors even when security is not enabled

This commit is contained in:
Simon Duquennoy 2017-07-14 17:22:08 +02:00 committed by Yasuyuki Tanaka
parent 688c6ee114
commit 37b7c2e90b
1 changed files with 6 additions and 5 deletions

View File

@ -763,6 +763,12 @@ PT_THREAD(tsch_rx_slot(struct pt *pt, struct rtimer *t))
packet_duration = TSCH_PACKET_DURATION(current_input->len);
if(!frame_valid) {
TSCH_LOG_ADD(tsch_log_message,
snprintf(log->message, sizeof(log->message),
"!failed to parse frame %u %u", header_len, current_input->len));
}
if(frame_valid) {
if(frame.fcf.frame_type != FRAME802154_DATAFRAME
&& frame.fcf.frame_type != FRAME802154_BEACONFRAME) {
@ -786,11 +792,6 @@ PT_THREAD(tsch_rx_slot(struct pt *pt, struct rtimer *t))
"!failed to authenticate frame %u", current_input->len));
frame_valid = 0;
}
} else {
TSCH_LOG_ADD(tsch_log_message,
snprintf(log->message, sizeof(log->message),
"!failed to parse frame %u %u", header_len, current_input->len));
frame_valid = 0;
}
#endif /* LLSEC802154_ENABLED */