Freom Dennis:
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. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9122 svn path=/trunk/; revision=51918
This commit is contained in:
parent
60aaa2d842
commit
0bb9585cd6
|
@ -85,6 +85,7 @@ dissect_ieee802a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tvbuff_t *next_tvb;
|
||||
const gchar *manuf;
|
||||
guint8 oui[3];
|
||||
guint32 oui32;
|
||||
guint16 pid;
|
||||
oui_info_t *oui_info;
|
||||
dissector_table_t subdissector_table;
|
||||
|
@ -99,6 +100,7 @@ dissect_ieee802a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
tvb_memcpy(tvb, oui, 0, 3);
|
||||
oui32 = oui[0] << 16 | oui[1] << 8 | oui[2];
|
||||
manuf = get_manuf_name_if_known(oui);
|
||||
pid = tvb_get_ntohs(tvb, 3);
|
||||
|
||||
|
@ -107,7 +109,7 @@ dissect_ieee802a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
manuf ? manuf : "Unknown", pid);
|
||||
|
||||
proto_tree_add_uint_format_value(ieee802a_tree, hf_ieee802a_oui,
|
||||
tvb, 0, 3, oui[0] << 16 | oui[1] << 8 | oui[2], "%s (%s)",
|
||||
tvb, 0, 3, oui32, "%s (%s)",
|
||||
bytes_to_str_punct(oui, 3, ':'), manuf ? manuf : "Unknown");
|
||||
|
||||
/*
|
||||
|
@ -115,7 +117,7 @@ dissect_ieee802a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
*/
|
||||
if (oui_info_table != NULL &&
|
||||
(oui_info = (oui_info_t *)g_hash_table_lookup(oui_info_table,
|
||||
GUINT_TO_POINTER(oui))) != NULL) {
|
||||
GUINT_TO_POINTER(oui32))) != NULL) {
|
||||
/*
|
||||
* Yes - use it.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue