diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-01-21 18:05:47 -0500 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-01-22 07:06:30 +0000 |
commit | 9f5a0601a648da841183b5e5efba8691e95d5cf8 (patch) | |
tree | 760ef6abc42d9cec4b02f7c828455e765836078c /epan | |
parent | ed587b23a75e06f0a655fd879b46571981a11a52 (diff) |
NFSv4.1 bugfixes
nfs: Fix up the SEQUENCE status flags
The SEQUENCE status flags are being displayed incorrectly (after the NFSv4
operations) due to being attached to the COMPOUND tree instead of the
SEQUENCE op's tree.
nfs/flexfiles: Ensure that we account for the layout_flags in the offset
nfs/flexfiles: Add a dissector for the optional layoutget "stats collect hint"
field
Change-Id: I8744254aa9f65a0b33510f2352875b01804149c2
Fixes: d892c32cc2d0 ("Eliminate proto_tree_add_text from packet-nfs.c")
Fixes: 79b88aacb6d1 ("nfs: Cleanup of FlexFiles Layout Type")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Reviewed-on: https://code.wireshark.org/review/13477
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-nfs.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index d0206450b4..e2a2a3755e 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -604,6 +604,7 @@ static int hf_nfs4_fattr_change_attr_type = -1; static int hf_nfs4_ff_layout_flags = -1; static int hf_nfs4_ff_layout_flags_no_layoutcommit = -1; static int hf_nfs4_ff_layout_flags_no_io_thru_mds = -1; +static int hf_nfs4_ff_stats_collect_hint = -1; static int hf_nfs4_ff_synthetic_owner = -1; static int hf_nfs4_ff_synthetic_owner_group = -1; static int hf_nfs4_ff_bytes_completed = -1; @@ -9061,8 +9062,10 @@ dissect_nfs4_layoutget(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree guint ds_count, fh_count; proto_tree *ds_tree; proto_item *ds_fitem; + int end_offset = offset; /* NFS Flex Files */ + end_offset += tvb_get_ntohl(tvb, offset) + 4; offset += 4; /* Skip past opaque count */ /* stripe unit */ @@ -9117,6 +9120,12 @@ dissect_nfs4_layoutget(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree proto_tree_add_bitmask(newtree, tvb, offset, hf_nfs4_ff_layout_flags, ett_nfs4_ff_layout_flags, layout_flags, ENC_BIG_ENDIAN); + offset += 4; + + if (offset + 4 <= end_offset) + offset = dissect_rpc_uint32(tvb, newtree, + hf_nfs4_ff_stats_collect_hint, + offset); } else { offset = dissect_nfsdata(tvb, offset, newtree, hf_nfs4_layout); continue; @@ -10397,7 +10406,7 @@ dissect_nfs4_response_op(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_slotid, offset); offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_high_slotid, offset); offset = dissect_rpc_uint32(tvb, newftree, hf_nfs4_target_high_slotid, offset); - proto_tree_add_bitmask(tree, tvb, offset, hf_nfs4_sequence_status_flags, ett_nfs4_sequence_status_flags, sequence_flags, ENC_BIG_ENDIAN); + proto_tree_add_bitmask(newftree, tvb, offset, hf_nfs4_sequence_status_flags, ett_nfs4_sequence_status_flags, sequence_flags, ENC_BIG_ENDIAN); offset += 4; } break; @@ -13272,6 +13281,10 @@ proto_register_nfs(void) "FLAG_NO_IO_THRU_MDS", "nfs.ff.layout_flags.no_io_thru_mds", FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x00000002, NULL, HFILL}}, + { &hf_nfs4_ff_stats_collect_hint, { + "stats collect hint", "nfs.ff.stats_collect_hint", FT_UINT32, BASE_DEC, + NULL, 0, "Layoutstats sampling period hint, Seconds", HFILL }}, + { &hf_nfs4_fattr_clone_blocksize, { "clone block size", "nfs.fattr4.clone_block_size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, |