A small fix to NFSv4 to properly decode the secinfo response array, the array
authorRichard Sharpe <sharpe@ns.aus.com>
Thu, 22 May 2003 21:37:54 +0000 (21:37 -0000)
committerRichard Sharpe <sharpe@ns.aus.com>
Thu, 22 May 2003 21:37:54 +0000 (21:37 -0000)
of secinfo flavors returned.

svn path=/trunk/; revision=7717

packet-nfs.c
packet-rpc.c

index 235a561a902a6a60dcbf16dc3ada5b3069e9612f..6b0130e93392613463821293eef68139f6db7597 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for nfs dissection
  * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
  * Copyright 2000-2002, Mike Frisch <frisch@hummingbird.com> (NFSv4 decoding)
- * $Id: packet-nfs.c,v 1.88 2003/05/22 05:49:23 sharpe Exp $
+ * $Id: packet-nfs.c,v 1.89 2003/05/22 21:37:54 sharpe Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -255,6 +255,7 @@ static int hf_nfs_aceflag4 = -1;
 static int hf_nfs_acemask4 = -1;
 static int hf_nfs_delegate_type = -1;
 static int hf_nfs_secinfo_flavor = -1;
+static int hf_nfs_secinfo_arr4 = -1;
 static int hf_nfs_num_blocks = -1;
 static int hf_nfs_bytes_per_block = -1;
 static int hf_nfs_eof = -1;
@@ -6467,7 +6468,7 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                /*
                 * With the exception of NFS4_OP_LOCK, NFS4_OP_LOCKT, and
                 * NFS4_OP_SETATTR, all other ops do *not* return data with the
-                * failed status code.
+                * failed status code. 
                 */
                if ((status != NFS4_OK) &&
                        ((opcode != NFS4_OP_LOCK) && (opcode != NFS4_OP_LOCKT) &&
@@ -6571,8 +6572,8 @@ dissect_nfs_resop4(tvbuff_t *tvb, int offset, packet_info *pinfo,
                        break;
 
                case NFS4_OP_SECINFO:
-                       offset = dissect_rpc_list(tvb, pinfo, tree, offset,
-                               dissect_nfs_secinfo4_res);
+                       offset = dissect_rpc_array(tvb, pinfo, newftree, offset,
+                               dissect_nfs_secinfo4_res, hf_nfs_secinfo_arr4);
                        break;
 
                case NFS4_OP_SETATTR:
@@ -7616,6 +7617,10 @@ proto_register_nfs(void)
                { &hf_nfs_r_addr, {
                        "r_addr", "nfs.r_addr", FT_BYTES, BASE_DEC, NULL, 0,
                        "r_addr", HFILL }},
+
+               { &hf_nfs_secinfo_arr4, {
+                       "Flavors Info", "nfs.flavors.info", FT_NONE, BASE_NONE,
+                       NULL, 0, "Flavors Info", HFILL }},
        };
 
        static gint *ett[] = {
index 803d0b0ae62e141fc2503eebd8724e8c2f091caa..a191460b18412a733be078ad616c245c4601d3ff 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for rpc dissection
  * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de>
  *
- * $Id: packet-rpc.c,v 1.128 2003/05/22 17:11:18 sharpe Exp $
+ * $Id: packet-rpc.c,v 1.129 2003/05/22 21:37:54 sharpe Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -668,7 +668,11 @@ dissect_rpc_opaque_data(tvbuff_t *tvb, int offset,
                            "contents: %s", string_buffer_print);
                }
        }
+       proto_tree_add_text(string_tree, tvb, offset, -1,
+                                    " Offsetb %d:", offset);
        offset += string_length_copy;
+       proto_tree_add_text(string_tree, tvb, offset, -1,
+                                    " Offseta %d:", offset);
        if (fill_length) {
                if (string_tree) {
                        if (fill_truncated) {