While investigating the transum-related crash, I had suspected some unregistered hf’s and ran the various tools like checkhf.pl. I then noticed that a number
of dissectors seemed to have changed a bit from what I was used to before, which lead me to the realization that at least some of these scripts no longer work as effectively as they once did, at least as far as I can tell.
For example, if you remove an hf entry from the packet-wol.c’s hf_register_info array and run checkhf.pl
on packet-wol.c, you get output like this:
$ tools/checkhf.pl epan/dissectors/packet-wol.c
ERROR: NO ARRAY: epan/dissectors/packet-wol.c: hf_wol_passwd
… but if you remove an entry from the packet-udp.c’s header_field_info, such as &hfi_udp_srcport, then checkhf.pl
won’t detect it. Later you end up with a dissector bug when running Wireshark of the form:
10:44:53.343 Warn Dissector bug, protocol UDP, in packet 1: proto.c:3377: failed assertion "(guint)hfinfo->id < gpa_hfinfo.len" (Unregistered hf!)
While it’s nice to get the warning, the bug would have been caught much earlier using the checkhf.pl tool had the code been structured like it used to be. Do these tools need to be updated to detect problems that were easily caught
previously?
And I guess I missed the reasoning behind the restructuring, but what is the purpose/benefit of this restructuring and use of HAVE_HFI_SECTION_INIT?
Thanks.
- Chris
CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain proprietary, confidential or trade secret information. This message is intended solely for the use of the addressee. If you are not the intended recipient and have received this message in error, please delete this message from your system. Any unauthorized reading, distribution, copying, or other use of this message or its attachments is strictly prohibited.