From billyjeans:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 5 Feb 2012 13:09:10 +0000 (13:09 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 5 Feb 2012 13:09:10 +0000 (13:09 +0000)
EAP-TLS cannot re-initialize properly if previous EAP-TLS conversation is not properly finished.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5633

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40863 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-eap.c

index 7b47796..4351c7f 100644 (file)
@@ -738,7 +738,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     if (tree)
       proto_tree_add_uint(eap_tree, hf_eap_type, tvb, 4, 1, eap_type);
 
-    if (len > 5) {
+    if (len > 5 || (len == 5 && eap_type == EAP_TYPE_ID)) {
       int     offset = 5;
       gint    size   = len - offset;
 
@@ -752,8 +752,10 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                              size, plurality(size, "", "s"),
                              tvb_format_text(tvb, offset, size));
          }
-       if(!pinfo->fd->flags.visited)
+       if(!pinfo->fd->flags.visited) {
          conversation_state->leap_state = 0;
+         conversation_state->eap_tls_seq = -1;
+       }
        break;
 
       /*********************************************************************
@@ -816,6 +818,8 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        more_fragments = test_flag(flags,EAP_TLS_FLAG_M);
        has_length = test_flag(flags,EAP_TLS_FLAG_L);
+       if (test_flag(flags,EAP_TLS_FLAG_S)) 
+               conversation_state->eap_tls_seq = -1;
 
        /* Flags field, 1 byte */
        if (tree) {