https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5656
Summary: Cleanup 802.11 Dissector : Enhance add_fixed_field
dissector
Product: Wireshark
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Low
Component: Wireshark
AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
ReportedBy: alexis.lagoutte@xxxxxxxxx
Build Information:
TShark 1.5.1 (SVN Rev 35832 from /trunk)
Copyright 1998-2011 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (32-bit) with GLib 2.26.0, with libpcap 1.1.1, with libz 1.2.3.4, with
POSIX capabilities (Linux), without libpcre, with SMI 0.4.8, with c-ares 1.7.3,
with Lua 5.1, without Python, with GnuTLS 2.8.6, with Gcrypt 1.4.5, with MIT
Kerberos, with GeoIP.
Running on Linux 2.6.35-23-generic, with libpcap version 1.1.1, with libz
1.2.3.4.
Built using gcc 4.4.5.
--
A patch to enhance add_fixed_field dissector
* Replace proto_tree_add_uint/boolean/... by proto_tree_add_item
* Replace some macro by bitmask (TSI..)
* Other stuff...
The code is checked and fuzzed
There is a strange code :
case SM_ACTION_DLS_RESPONSE:
add_fixed_field(action_tree, tvb, offset,
FIELD_CATEGORY_CODE);
add_fixed_field(action_tree, tvb, offset+1,
FIELD_DLS_ACTION_CODE);
add_fixed_field(action_tree, tvb, offset+2,
FIELD_STATUS_CODE);
add_fixed_field(action_tree, tvb, offset+4,
FIELD_DST_MAC_ADDR);
add_fixed_field(action_tree, tvb, offset+10,
FIELD_SRC_MAC_ADDR);
length += 16;
if (!hf_ieee80211_ff_status_code)
add_fixed_field(action_tree, tvb, offset+16,
FIELD_CAP_INFO);
break;
hf_ieee80211_ff_status_code is always Positive (TRUE) ? and the code is never
execute
Also for FIELD_ACTION, It would not be a good idea to create a sub dissector ?
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.