aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-eap.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-07-24 20:39:19 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-07-24 20:39:19 +0000
commit663c3b23408703127454231bd39852d129805b8f (patch)
tree1b450b38aac4f2a96f28897fdddf5ddfb309f6ee /epan/dissectors/packet-eap.c
parent6e573eb0196e16989e16e7555f1148f26771eecd (diff)
Fix some typoes.
Call "dissect_attribute_value_pairs()" regardless of whether we're building a protocol tree, so the EAP subdissector is always called. "dissect_attribute_value_pairs()" is only called when the length of AVPs in the packet is non-zero; don't bother checking for a zero length. Don't put two items in for each AVP - one is sufficient. Add some more length checks when processing AVPs. Don't require AVPs to be at least 3 bytes long - they might have just a type and length; let an exception be thrown if that's a problem. Don't require that the entire AVP be available in the tvbuff before processing it; let an exception be thrown as we're processing the AVP if we don't have all the data, so the stuff before the end is processed. Give the tvbuff for the AVP data a length that reflects the length of data left in the tvbuff, so that the appropriate exception is thrown if the packet was cut short by a snapshot length. Don't have a fixed-length buffer for reassembled EAP messages; grow it as necessary. Don't special-case the initial part of the processing of EAP messages; put in the standard length item, as well as, for fragments, an item for the fragment data. Check for non-consecutive EAP-Message attributes. Set the columns non-writable while dissecting the EAP message, so Protocol and Info reflect the RADIUS packet. Doing the reassembly by gluing together all the consecutive EAP-Message attributes means we don't need help from the EAP dissector, returning the total length of the EAP message. Get rid of the no-longer-needed eap_fragment dissector; just call the regular EAP dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15046 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-eap.c')
-rw-r--r--epan/dissectors/packet-eap.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/epan/dissectors/packet-eap.c b/epan/dissectors/packet-eap.c
index a00c0a67bb..d786bc77e9 100644
--- a/epan/dissectors/packet-eap.c
+++ b/epan/dissectors/packet-eap.c
@@ -597,8 +597,7 @@ dissect_eap_aka(proto_tree *eap_tree, tvbuff_t *tvb, int offset, gint size)
}
static int
-dissect_eap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- gboolean fragmented)
+dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 eap_code;
guint8 eap_id;
@@ -695,18 +694,6 @@ dissect_eap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
eap_len = tvb_get_ntohs(tvb, 2);
len = eap_len;
- if (fragmented) {
- /*
- * This is an EAP fragment inside, for example, RADIUS. If we don't
- * have all of the packet data, return the negative of the amount of
- * additional data we need.
- */
- int reported_len = tvb_reported_length_remaining(tvb, 0);
-
- if (reported_len < len)
- return -(len - reported_len);
- }
-
if (tree) {
ti = proto_tree_add_item(tree, proto_eap, tvb, 0, len, FALSE);
eap_tree = proto_item_add_subtree(ti, ett_eap);
@@ -1190,18 +1177,6 @@ dissect_eap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
return tvb_length(tvb);
}
-static int
-dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
-{
- return dissect_eap_data(tvb, pinfo, tree, FALSE);
-}
-
-static int
-dissect_eap_fragment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
-{
- return dissect_eap_data(tvb, pinfo, tree, TRUE);
-}
-
void
proto_register_eap(void)
{
@@ -1265,7 +1240,6 @@ proto_register_eap(void)
register_init_routine(&eap_init_protocol);
new_register_dissector("eap", dissect_eap, proto_eap);
- new_register_dissector("eap_fragment", dissect_eap_fragment, proto_eap);
register_init_routine(eaptls_defragment_init);
}