Revert "Reset the "current conversation elements" after each dissector call"

We do want to reset these (and probably most other elements of the
packet_info struct) when starting to process a new PDU at the same
protocol level as the most recently processed dissector. However,
find_conversation_pinfo() is used in the GUI and elsewhere to get
the final value of conversation and address information, so we don't
want to reset the values after the last PDU.

Revert this until we can find a better general way of handling this.
(!8013 handles the specific PPP case for #18278.) Perhaps eventually
there should be some separation between addresses and conversation
information used for the next dissector called, and the value for
the packet used after the packet is fully dissected (by the GUI, etc.)

This reverts commit 80e287f82c.

Fix #18781.
This commit is contained in:
John Thacker 2023-02-27 08:16:25 -05:00
parent d64114f48e
commit 18572b4336
1 changed files with 0 additions and 10 deletions

View File

@ -867,9 +867,6 @@ call_dissector_work(dissector_handle_t handle, tvbuff_t *tvb, packet_info *pinfo
int len;
guint saved_layers_len = 0;
guint saved_tree_count = tree ? tree->tree_data->count : 0;
gboolean saved_use_conv_addr_port_endpoints;
struct conversation_addr_port_endpoints *saved_conv_addr_port_endpoints;
struct conversation_element *saved_conv_elements;
if (handle->protocol != NULL &&
!proto_is_protocol_enabled(handle->protocol)) {
@ -884,10 +881,6 @@ call_dissector_work(dissector_handle_t handle, tvbuff_t *tvb, packet_info *pinfo
saved_layers_len = wmem_list_count(pinfo->layers);
DISSECTOR_ASSERT(saved_layers_len < PINFO_LAYER_MAX_RECURSION_DEPTH);
saved_use_conv_addr_port_endpoints = pinfo->use_conv_addr_port_endpoints;
saved_conv_addr_port_endpoints = pinfo->conv_addr_port_endpoints;
saved_conv_elements = pinfo->conv_elements;
/*
* can_desegment is set to 2 by anyone which offers the
* desegmentation api/service.
@ -944,9 +937,6 @@ call_dissector_work(dissector_handle_t handle, tvbuff_t *tvb, packet_info *pinfo
}
pinfo->current_proto = saved_proto;
pinfo->can_desegment = saved_can_desegment;
pinfo->use_conv_addr_port_endpoints = saved_use_conv_addr_port_endpoints;
pinfo->conv_addr_port_endpoints = saved_conv_addr_port_endpoints;
pinfo->conv_elements = saved_conv_elements;
return len;
}