aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Sharpe <realrichardsharpe@gmail.com>2017-09-10 18:17:20 -0700
committerAnders Broman <a.broman58@gmail.com>2017-10-27 04:22:45 +0000
commitdb41ccd009ab01179f8629ba962e76ba7a6fda61 (patch)
treee2a89ad65cb032a2ed90b0ae17f56578757e2645
parent42a9e893fb95f8f8612b52d4be00f7bbf6f7546b (diff)
Device provisioning protocol: Fix a last issue with DPP and Configuration
commands not being searchable. Change-Id: I28cf212b3eacb16572ce9d1ff2dbf45040046b00 Reviewed-on: https://code.wireshark.org/review/24069 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-ieee80211.c4
-rw-r--r--epan/dissectors/packet-ieee80211.h4
-rw-r--r--epan/dissectors/packet-wifi-dpp.c24
3 files changed, 27 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 0c932f3..5a8a997 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -6866,7 +6866,7 @@ dissect_gas_initial_request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
if (subtype == ((DPP_CONFIGURATION_PROTOCOL << 8) | WFA_SUBTYPE_DPP)) {
col_append_fstr(pinfo->cinfo, COL_INFO, ", DPP - %s",
val_to_str(subtype >> 8, dpp_subtype_vals, "Unknown (%u)"));
- dissect_wifi_dpp_attributes(pinfo, query, tvb, offset);
+ dissect_wifi_dpp_config_proto(pinfo, query, tvb, offset);
}
break;
default:
@@ -6910,7 +6910,7 @@ dissect_gas_initial_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
if (subtype == ((DPP_CONFIGURATION_PROTOCOL << 8) | WFA_SUBTYPE_DPP)) {
col_append_fstr(pinfo->cinfo, COL_INFO, ", DPP - %s",
val_to_str(subtype >> 8, dpp_subtype_vals, "Unknown (%u)"));
- dissect_wifi_dpp_attributes(pinfo, query, tvb, offset);
+ dissect_wifi_dpp_config_proto(pinfo, query, tvb, offset);
}
break;
default:
diff --git a/epan/dissectors/packet-ieee80211.h b/epan/dissectors/packet-ieee80211.h
index fa8a5f6..9eae854 100644
--- a/epan/dissectors/packet-ieee80211.h
+++ b/epan/dissectors/packet-ieee80211.h
@@ -55,8 +55,8 @@ int add_tagged_field(packet_info *pinfo, proto_tree *tree,
guint valid_element_ids_count,
association_sanity_check_t *association_sanity_check);
-int dissect_wifi_dpp_attributes(packet_info *pinfo, proto_tree *query,
- tvbuff_t *tvb, int offset);
+int dissect_wifi_dpp_config_proto(packet_info *pinfo, proto_tree *query,
+ tvbuff_t *tvb, int offset);
#define MAX_SSID_LEN 32
#define MAX_PROTECT_LEN 10
diff --git a/epan/dissectors/packet-wifi-dpp.c b/epan/dissectors/packet-wifi-dpp.c
index e276078..33b27b3 100644
--- a/epan/dissectors/packet-wifi-dpp.c
+++ b/epan/dissectors/packet-wifi-dpp.c
@@ -189,7 +189,7 @@ dissect_wifi_dpp_ie(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, voi
return tvb_captured_length(tvb);
}
-int
+static int
dissect_wifi_dpp_attributes(packet_info *pinfo _U_, proto_tree *tree,
tvbuff_t *tvb, int offset _U_)
{
@@ -297,6 +297,28 @@ dissect_wifi_dpp_attributes(packet_info *pinfo _U_, proto_tree *tree,
return attributes_len; // We return the attribute length plus hdr!
}
+int
+dissect_wifi_dpp_config_proto(packet_info *pinfo _U_, proto_tree *tree,
+ tvbuff_t *tvb, int offset _U_)
+{
+ proto_item *dpp_item;
+ proto_tree *dpp_tree, *attr_tree;
+ guint remaining_len = tvb_reported_length_remaining(tvb, offset);
+
+ dpp_item = proto_tree_add_item(tree, proto_wifi_dpp, tvb, offset, -1, ENC_NA);
+ dpp_tree = proto_item_add_subtree(dpp_item, ett_wifi_dpp_pa);
+ proto_item_append_text(dpp_item, " Configuration");
+
+ attr_tree = proto_tree_add_subtree_format(dpp_tree, tvb, offset,
+ remaining_len,
+ ett_wifi_dpp_attributes, NULL,
+ "DPP Attributes");
+
+ offset = dissect_wifi_dpp_attributes(pinfo, attr_tree, tvb, offset);
+
+ return offset;
+}
+
static int
dissect_wifi_dpp_public_action(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{