Restore pinfo->match_uint after the topmost dissector returns.

That's what dissector_try_uint_new() does, and some tests depend on it.

Bug: 15630
Change-Id: I57934a5e90f83ee6ea0eb539a91826c950530ad3
Reviewed-on: https://code.wireshark.org/review/32542
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2019-03-23 12:05:22 -07:00
parent e7dc592406
commit 80d96e91d2
1 changed files with 3 additions and 0 deletions

View File

@ -618,11 +618,14 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
pinfo->rec->rec_header.packet_header.pkt_encap);
}
if (dissector_handle != NULL) {
guint32 save_match_uint = pinfo->match_uint;
pinfo->match_uint =
pinfo->rec->rec_header.packet_header.pkt_encap;
call_dissector_only(dissector_handle,
tvb, pinfo, parent_tree,
(void *)pinfo->pseudo_header);
pinfo->match_uint = save_match_uint;
} else {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %d",