Ignore FF padding in mstpcap (#120)

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2020-09-17 09:59:48 -05:00
committed by GitHub
parent 5c2f198fd8
commit cbaa106c59
+5 -1
View File
@@ -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++;