diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-26 09:09:23 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-27 12:15:06 +0000 |
commit | 56bb0ac1c7dfe59557b5e70e47415c6051b5ba31 (patch) | |
tree | 57708b7a4b33baad39ed5ce6464a52ced2a3870a | |
parent | d752a7b44ed0c0e52b1052a90d3144fa9be02a9c (diff) | |
download | wireshark-56bb0ac1c7dfe59557b5e70e47415c6051b5ba31.tar.gz |
[LDAP] Bugfix counting of search results.
Bug: 11761
Change-Id: Icd955b848edc9f802331f25ab1b8684aa2631553
Reviewed-on: https://code.wireshark.org/review/12184
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
(cherry picked from commit c51f207308d04bda005f84828b59cec4104e4b8f)
Reviewed-on: https://code.wireshark.org/review/12221
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | asn1/ldap/ldap.cnf | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-ldap.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index dfad13183f..d4729418a4 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -125,11 +125,12 @@ PasswordPolicyResponseValue B "1.3.6.1.4.1.42.2.27.8.5.1" "passwordPolicy" /* XXX: the count will not work if the results span multiple TCP packets */ - if(ldap_info && tree) { /* only count once - on tree pass */ + if(ldap_info) { /* only count once */ switch(ProtocolOp) { case LDAP_RES_SEARCH_ENTRY: - ldap_info->num_results++; + if (!actx->pinfo->fd->flags.visited) + ldap_info->num_results++; proto_item_append_text(tree, " [%d result%s]", ldap_info->num_results, ldap_info->num_results == 1 ? "" : "s"); @@ -144,7 +145,6 @@ PasswordPolicyResponseValue B "1.3.6.1.4.1.42.2.27.8.5.1" "passwordPolicy" proto_item_append_text(tree, " [%d result%s]", ldap_info->num_results, ldap_info->num_results == 1 ? "" : "s"); - ldap_info->num_results = 0; break; default: break; diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index c36b05095d..803a7efa4c 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -3183,11 +3183,12 @@ dissect_ldap_ProtocolOp(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset /* XXX: the count will not work if the results span multiple TCP packets */ - if(ldap_info && tree) { /* only count once - on tree pass */ + if(ldap_info) { /* only count once */ switch(ProtocolOp) { case LDAP_RES_SEARCH_ENTRY: - ldap_info->num_results++; + if (!actx->pinfo->fd->flags.visited) + ldap_info->num_results++; proto_item_append_text(tree, " [%d result%s]", ldap_info->num_results, ldap_info->num_results == 1 ? "" : "s"); @@ -3202,7 +3203,6 @@ dissect_ldap_ProtocolOp(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset proto_item_append_text(tree, " [%d result%s]", ldap_info->num_results, ldap_info->num_results == 1 ? "" : "s"); - ldap_info->num_results = 0; break; default: break; |