From cbaa106c59b7300cce1454c5876ebe09998f5fa3 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Thu, 17 Sep 2020 09:59:48 -0500 Subject: [PATCH] Ignore FF padding in mstpcap (#120) Co-authored-by: Steve Karg --- apps/mstpcap/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/mstpcap/main.c b/apps/mstpcap/main.c index fc9e22e8..8eba2e58 100644 --- a/apps/mstpcap/main.c +++ b/apps/mstpcap/main.c @@ -1158,7 +1158,11 @@ int main(int argc, char *argv[]) packet_count++; } else if (mstp_port->receive_state == MSTP_RECEIVE_STATE_IDLE) { if (MSTP_Receive_State == MSTP_RECEIVE_STATE_IDLE) { - if (mstp_port->EventCount) { + if ((mstp_port->EventCount == 1) && + (mstp_port->DataRegister == 0xFF)) { + /* 0xFF padding at end of message is allowed */ + mstp_structure_init(mstp_port); + } else if (mstp_port->EventCount > 1) { write_received_packet(mstp_port, 1); mstp_structure_init(mstp_port); Invalid_Frame_Count++;