-
Notifications
You must be signed in to change notification settings - Fork 136
Tshark version problem #219
Comments
For testing IPv4 and IPv6 header issues when importing pcap and pdml files, I'm enclosing icmp_packets.zip with the following contents:
It uses a non-zero DSCP value and the don't fragment bit (on IPv4) to test also these fields. The tshark1 files are pdml generated by tshark v1.12.1, the tshark2 files are generated by tshark v2.2.7. I've noticed two issues with tshark v2. But I've tested only the IPv4 and IPv6 header, maybe there are more differences in other protocol headers: IPv4: The ip.version field contains only the high 4 bits, while in tshark v1 it contains the whole byte (including the header length). A quick and dirty fix is to use the ip.hdr_len field. That contains the whole byte in both tshark versions. It's dirty, because in future this field may contain only the lower 4 bits (only the length bits). Here the patch:
IPv6: The traffic class field is named ipv6.class in tshark v1 and ipv6.tclass in tshark v2. My fix is to load both fields:
|
@Ehlers Thanks for the proposed fixes. Do these fixes work with both Wireshark 1.x and 2.x? |
That's the idea. But on my ostinato machine I have only Wireshark v2 installed. So I tested the PCAP and PDML import with Wireshark v2. Furthermore I loaded the PDML files from Wireshark v1 (from another machine) und checked, that it was correctly imported. So you might want to check with your Ostinato and Wireshark v1 if the attached PCAP files are loading correctly. |
@Ehlers Will check on my machine and Wireshark v1. Meanwhile I'm trying to find out when and why was this change made in Wireshark to try and see if it affects more than just IPv4/IPv6. Stay tuned. If you don't hear from me in a couple of days, please bump this ticket. |
Regarding IPv4 version and header length - On June 18, 2014, IPv4 Version and Header Length were converted from byte value to bit values On Apr 29, 2016, IPv4 Header Length was converted back to a byte value This means some version(s) of Wireshark would work correctly and some won't. So it might be better for us to treat these two fields specially so that they work for all versions. Regarding IPv6 traffic class - As per the Wireshark IPv6 Display filter reference, Mapping both these Wireshark fields to the same Ostinato field is effectively a OR and hence the proposed fix should be ok. I'm now trying to see if there are other fields that also changed between 1.x and 2.x and once I have that info, we can take a final call on how to proceed with the fix(es). Stay tuned. |
Regarding the IPv4 version and header length: For me it looks, as if the complete byte can be retrieved from the unmaskedvalue attribute, when only some bits are included in the value. So perhaps you might first try to use the unmaskedvalue attribute of ip.version. When that doesn't exist, use the value attribute of ip.version. |
@Ehlers That's right. I'm trying to determine if there are many more such changes (e.g. in other protocols) in which case I would try to make this change generically instead of specifically to IPv4. |
I'm not able to find the time to investigate which other fields may have broken with Wireshark 2.x, so I'm going to fix IPv4 and IPv6 for now and will raise a new bug as and when I find other fields which need a fix. |
@Ehlers Can you please verify this fix solves the problem with 2.x? I don't have access to that right now. |
Just verified it with Wireshark v2.2.1, works great. No issue found with IPv4, IPv6, ICMPv4 and ICMPv6. |
Ostinato 0.8 does not work well when importing pcap files : with new versions of wireshark/tshark (2.2.6 for me), hex dump part for ip version & header length is changed from x45 to x04, triggering some alerts from wireshark when replayed.
Thanks for correcting it.
Original report and associated discussion on the mailing list
The text was updated successfully, but these errors were encountered: