From 80d96e91d248af40b50969702a0e5aafb7132376 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 23 Mar 2019 12:05:22 -0700 Subject: [PATCH] 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 Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- epan/dissectors/packet-frame.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index 091cbb4d78..1b83500774 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -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",