diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-11-06 09:18:46 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-11-06 09:18:46 +0000 |
commit | ffb6fbe8fd649a350dc455599d7b75e3338df78d (patch) | |
tree | cfe9cb0a01b0cbe388dbafc473faa3c111c86576 /packet-ldap.c | |
parent | a1bf50266869a2ed2e75e3a273cdf4612546ad7b (diff) |
Update to LDAP and TCP
LDAP messages that span multiple segments will throw an exception unless we have reassembly enabled.
Update TCP so that IF an exception was thrown that we still pick up any hints
provided by the subdissector about where the next PDU starts.
Update LDAP so that it will rpovide hints to TCP about where the next LDAP PDU starts in the sequence number space.
Thus now ethereal can find and dissect LDAP PDUs that starts somewhere in the middle of a TCP segment.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8895 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ldap.c')
-rw-r--r-- | packet-ldap.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/packet-ldap.c b/packet-ldap.c index 6768d37b5a..f1ace41ec2 100644 --- a/packet-ldap.c +++ b/packet-ldap.c @@ -3,7 +3,7 @@ * * See RFC 1777 (LDAP v2), RFC 2251 (LDAP v3), and RFC 2222 (SASL). * - * $Id: packet-ldap.c,v 1.66 2003/11/05 20:10:00 guy Exp $ + * $Id: packet-ldap.c,v 1.67 2003/11/06 09:18:46 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1957,13 +1957,16 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* - * Can we do reassembly? + * Is the buffer split across segment boundaries? */ - if (ldap_desegment && pinfo->can_desegment) { + if (length_remaining < message_data_len) { + /* provide a hint to TCP where the next PDU starts */ + pinfo->want_pdu_tracking=2; + pinfo->bytes_until_next_pdu=message_data_len-length_remaining; /* - * Yes - is the buffer split across segment boundaries? + * Can we do reassembly? */ - if (length_remaining < message_data_len) { + if (ldap_desegment && pinfo->can_desegment) { /* * Yes. Tell the TCP dissector where the data for this message * starts in the data it handed us, and how many more bytes we @@ -2112,13 +2115,16 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* - * Can we do reassembly? + * Is the message split across segment boundaries? */ - if (ldap_desegment && pinfo->can_desegment) { + if (length_remaining < messageLength) { + /* provide a hint to TCP where the next PDU starts */ + pinfo->want_pdu_tracking=2; + pinfo->bytes_until_next_pdu=messageLength-length_remaining; /* - * Yes - is the message split across segment boundaries? + * Can we do reassembly? */ - if (length_remaining < messageLength) { + if (ldap_desegment && pinfo->can_desegment) { /* * Yes. Tell the TCP dissector where the data for this message * starts in the data it handed us, and how many more bytes |