diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2021-10-26 16:36:51 +0200 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-10-26 20:15:41 +0000 |
commit | 646e3db99a5e532f5f09d392424ca942bff1f40d (patch) | |
tree | 37a71ec4fb55496a1e1310bdf00e674d4bed2335 /epan | |
parent | 9104a3744e63b54b2cff3152aedeea340976355b (diff) |
EAP: Add Autority ID Data from EAP-FAST
4.1.1 Authority ID Data https://datatracker.ietf.org/doc/html/rfc4851#section-4.1.1
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-eap.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/epan/dissectors/packet-eap.c b/epan/dissectors/packet-eap.c index f401d288c3..8cda6fc71c 100644 --- a/epan/dissectors/packet-eap.c +++ b/epan/dissectors/packet-eap.c @@ -615,6 +615,9 @@ static int hf_eap_tls_fragment_too_long_fragment = -1; static int hf_eap_tls_fragment_error = -1; static int hf_eap_tls_fragment_count = -1; static int hf_eap_tls_reassembled_length = -1; +static int hf_eap_fast_type = -1; +static int hf_eap_fast_length = -1; +static int hf_eap_fast_aidd = -1; static gint ett_eap_tls_fragment = -1; static gint ett_eap_tls_fragments = -1; static gint ett_eap_sim_attr = -1; @@ -1735,6 +1738,30 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) offset += 4; } + /* 4.1.1 Authority ID Data https://datatracker.ietf.org/doc/html/rfc4851#section-4.1.1 */ + if (eap_type == EAP_TYPE_FAST && is_start) { + guint32 length, type; + + proto_tree_add_item_ret_uint(eap_tree, hf_eap_fast_type, tvb, offset, 2, ENC_BIG_ENDIAN, &type); + size -= 2; + offset += 2; + + proto_tree_add_item_ret_uint(eap_tree, hf_eap_fast_length, tvb, offset, 2, ENC_BIG_ENDIAN, &length); + size -= 2; + offset += 2; + + proto_tree_add_item(eap_tree, hf_eap_data, tvb, offset, length, ENC_NA); + + switch (type) { + case 4: + proto_tree_add_item(eap_tree, hf_eap_fast_aidd, tvb, offset, length, ENC_NA); + break; + } + size -= length; + offset += length; + + } + if (size > 0) { tvbuff_t *next_tvb = NULL; @@ -2743,6 +2770,21 @@ proto_register_eap(void) FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_eap_fast_type, { + "EAP-FAST Type", "eap.fast.type", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + + { &hf_eap_fast_length, { + "EAP-FAST Length", "eap.fast.length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + + { &hf_eap_fast_aidd, { + "Authority ID Data", "eap.fast.authority_id_data", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + /* Expanded type fields */ { &hf_eap_ext_vendor_id, { "EAP-EXT Vendor Id", "eap.ext.vendor_id", |