From billyjeans:
authorAnders Broman <anders.broman@ericsson.com>
Sun, 5 Feb 2012 13:09:10 +0000 (13:09 -0000)
committerAnders Broman <anders.broman@ericsson.com>
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

svn path=/trunk/; revision=40863

epan/dissectors/packet-eap.c

index 7b477966f0a383900686416477e2e124049c80d3..4351c7f95d1fc3dd47b91e3aace72214f21a31b8 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) {