kbandla / dpkt

fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
Other
1.09k stars 270 forks source link

fix 802.3 Ethernet fcs, padding and trailer #470

Closed obormot closed 3 years ago

obormot commented 4 years ago

438 had an example pcap which revealed that dpkt.ethernet was incorrectly decoding some FCS/padding/trailer bytes. This PR addresses these issues. Since some of it is heuristic I've looked at comments in Wireshark src https://github.com/wireshark/wireshark/blob/master/epan/dissectors/packet-eth.c : add_ethernet_trailer()

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.02%) to 89.126% when pulling 0cf95dc46212dad417aa647517ffb8f6a42577d2 on fix-#438-1 into 5a1387f7a8edcb355741ce9efaa84fcbec4551d9 on master.

obormot commented 3 years ago

@brifordwylie while you're at it, could you please review/merge this PR?