diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-12-22 09:58:28 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-12-22 09:58:28 +0000 |
commit | af7dca469a30f4e892804426dd56a2c6b23294b0 (patch) | |
tree | cfff6c20b1fc790b185ea7c72a3fe179b376c9bf /epan | |
parent | c52e88e19e906715d5bfbd78b58c9fa84a8cb23d (diff) |
Add only one protocol tree item for the "weak IV" flag - add it as a
non-hidden Boolean, and use "proto_tree_add_boolean_format()" to add it
to include the key byte.
svn path=/trunk/; revision=12815
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index d8407152e6..4900fa2c9d 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -2288,9 +2288,11 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree_add_uint (wep_tree, hf_wep_iv, tvb, hdr_len, 3, iv); tvb_memcpy(tvb, iv_buff, hdr_len, 3); is_iv_bad = weak_iv(iv_buff); - if (is_iv_bad != -1){ - proto_tree_add_text(wep_tree,tvb,0,0,"Weak IV for key byte %d", is_iv_bad); - proto_tree_add_boolean_hidden(wep_tree,hf_wep_iv_weak,tvb,0,0,1 ); + if (is_iv_bad != -1) { + proto_tree_add_boolean_format (wep_tree, hf_wep_iv_weak, + tvb, 0, 0, TRUE, + "Weak IV for key byte %d", + is_iv_bad); } } if (tree) @@ -3508,8 +3510,7 @@ static void init_wepkeys(void) { * for a weak IV as specified in FMS section 7.1 * */ -static -int +static int weak_iv(guchar *iv) { guchar sum, k; |