aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikhyat Umrao <vumrao@redhat.com>2014-05-29 15:43:48 +0530
committerMichael Mann <mmann78@netscape.net>2014-05-29 11:21:03 +0000
commit2fa59969840e4f5af94b8f2d2701f5fe047ef587 (patch)
treec114f3d6e2dbf5a7b8182170fa02f08c6fb3f49b
parentababf68de7b0f61690c49db481ae6b61cc83eacd (diff)
glusterfs: if filename itself will become <EMPTY>
This patch will solve the issue in LOOKUP procedure if filename itself will become <EMPTY>. Change-Id: Ib983ac4f9325db040a6b4eb3fc63179b36103bf4 Reported-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Vikhyat Umrao <vumrao@redhat.com> Reviewed-on: https://code.wireshark.org/review/1854 Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-glusterfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-glusterfs.c b/epan/dissectors/packet-glusterfs.c
index 1d7c0fb47e..4dcd8e0e91 100644
--- a/epan/dissectors/packet-glusterfs.c
+++ b/epan/dissectors/packet-glusterfs.c
@@ -1440,12 +1440,14 @@ glusterfs_gfs3_3_op_lookup_call(tvbuff_t *tvb, int offset,
packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
const char *name = NULL;
+ int length;
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_gfid, offset);
offset = glusterfs_rpc_dissect_gfid(tree, tvb, hf_glusterfs_pargfid, offset);
offset = glusterfs_rpc_dissect_flags(tree, tvb, offset);
+ length = tvb_get_letohl(tvb, offset);
offset = dissect_rpc_string(tvb, tree, hf_glusterfs_bname, offset, &name);
offset = gluster_rpc_dissect_dict(tree, tvb, hf_glusterfs_dict, offset);
- if(!strncmp(name, RPC_STRING_EMPTY, strlen(RPC_STRING_EMPTY)))
+ if(length == 0)
col_append_fstr(pinfo->cinfo, COL_INFO, ", Filename: (nameless, by GFID)");
else
col_append_fstr(pinfo->cinfo, COL_INFO, ", Filename: %s", name);