URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c38f4e1391cc914271e168606cc1e8adcc973bd8
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
c38f4e1 by Anthony Coddington (anthony.coddington@xxxxxxxxxx):
pcap-common: Account for padding in ENCAP_ERF len and caplen
Set len and caplen in pcap_read_post_process to actual wlen/payload length like for native ERF.
This fixes padding incorrectly showing as an Ethernet trailer or equivalent as
well as packet length calculations being incorrect.
Fix up rlen when writing ENCAP_ERF so it isn't longer than the actual record
length. This differs from native ERF behaviour which pads the record instead
but there is currently no non-hackish way to do this for pcap/pcap-ng.
Note: This means records captured from a DAG card in Wireshark (or old
PCAP(-NG) files opened) will have padding stripped when saved as PCAP(-NG) and
thus cannot be transmitted when converted to native ERF without aligning first.
However, if the file is saved as native ERF originally the padding will be
preserved (and zeroed). Given that extension header write support was very
broken and transmission of PCAP(-NG) is not supported without conversion this
is not expected to have been common.
Ping-Bug: 3606
Change-Id: I49dce03984d7f07431b6eb7e16a993aeb571f288
Reviewed-on: https://code.wireshark.org/review/15359
Petri-Dish: Michael Mann <mmann78@xxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
Actions performed:
from f295bf1 ERF: Add dissection of missing ERF types
adds c38f4e1 pcap-common: Account for padding in ENCAP_ERF len and caplen
Summary of changes:
wiretap/pcap-common.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)