ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 9122] New: Customized OUI is not recognized correctly duri

Date: Mon, 09 Sep 2013 02:58:46 +0000
Bug ID 9122
Summary Customized OUI is not recognized correctly during dissection.
Classification Unclassified
Product Wireshark
Version SVN
Hardware All
OS All
Status UNCONFIRMED
Severity Blocker
Priority Low
Component Dissection engine (libwireshark)
Assignee [email protected]
Reporter [email protected]

Build Information:
Built with the latest trunk code.
Testing platform: Windows XP.
--
I'm writing a dissector plugin to analyze our own OUI extended Ethertype. I
find my sub-dissector is not called after I use ieee802a_add_oui() and
dissector_add_uint() to specify my customized OUI and PID.

As I looked into the implementation in epan/dissectors/packet-ieee802a.c,
there's a bug in the dissect_ieee802a(). After OUI and PID is parsed, it looks
for the customized sub-dissector_table by 
oui_info = (oui_info_t *)g_hash_table_lookup(oui_info_table,
GUINT_TO_POINTER(oui))
The problem is that the oui is defined as an array (guint8 oui[3]), whose value
contains the 3-byte customized OUI. However, here GUINT_TO_POINTER(oui)
converts the local array oui's address to the hash table key, instead of the
value. That cause the search in the hash table to fail, because the
ieee802_add_oui() use the OUI value as the key.

I attach my patch later to demonstrate how I fixed the problem. With the patch,
I can successfully get my dissector called.


You are receiving this mail because:
  • You are watching all bug changes.