forked from osmocom/wireshark
curr-num_layer is not always incremented by 1 when calling the subdissector
svn path=/trunk/; revision=52759
This commit is contained in:
parent
a93eb10ee9
commit
d9b9ff60df
|
@ -327,12 +327,13 @@ decode_udp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
if (try_heuristic_first && prev_heur_found) {
|
||||
/* do lookup with the heuristic subdissector table */
|
||||
/* save curr_layer_num as it might be changed by subdissector */
|
||||
guint8 curr_layer_num = pinfo->curr_layer_num;
|
||||
if (dissector_try_heuristic(heur_subdissector_list, next_tvb, pinfo, tree, NULL)) {
|
||||
if (!udp_p_info) {
|
||||
udp_p_info = wmem_new0(wmem_file_scope(), udp_p_info_t);
|
||||
udp_p_info->found_heuristic = TRUE;
|
||||
/* pinfo->curr_layer_num-1 because the heuristic dissector added one */
|
||||
p_add_proto_data(pinfo->fd, hfi_udp->id, pinfo->curr_layer_num-1, udp_p_info);
|
||||
p_add_proto_data(pinfo->fd, hfi_udp->id, curr_layer_num, udp_p_info);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue