NFS: Switch to p_[gs]et_proto_depth.

Change-Id: I9cb13a787568a71e384830be39ecae359f0560ee
Reviewed-on: https://code.wireshark.org/review/36856
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Gerald Combs 2020-04-15 09:01:45 -07:00 committed by Anders Broman
parent 759fb119a7
commit 251b16bb93
1 changed files with 3 additions and 4 deletions

View File

@ -1304,12 +1304,12 @@ nfs_full_name_snoop(packet_info *pinfo, nfs_name_snoop_t *nns, int *len, char **
parent_nns = (nfs_name_snoop_t *)g_hash_table_lookup(nfs_name_snoop_matched, &key);
if (parent_nns) {
unsigned fs_depth = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_nfs, 0));
unsigned fs_depth = p_get_proto_depth(pinfo, proto_nfs);
if (++fs_depth >= NFS_MAX_FS_DEPTH) {
nns->fs_cycle = true;
return;
}
p_add_proto_data(pinfo->pool, pinfo, proto_nfs, 0, GUINT_TO_POINTER(fs_depth));
p_set_proto_depth(pinfo, proto_nfs, fs_depth);
nfs_full_name_snoop(pinfo, parent_nns, len, name, pos);
if (*name) {
@ -1318,8 +1318,7 @@ nfs_full_name_snoop(packet_info *pinfo, nfs_name_snoop_t *nns, int *len, char **
((*pos)[-1] != '/')?"/":"", nns->name);
DISSECTOR_ASSERT((*pos-*name) <= *len);
}
fs_depth--;
p_add_proto_data(pinfo->pool, pinfo, proto_nfs, 0, GUINT_TO_POINTER(fs_depth));
p_set_proto_depth(pinfo, proto_nfs, fs_depth - 1);
return;
}