Smb2-protocol: Re: [Smb2-protocol] smb2 update

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Stefan Metzmacher <metze@xxxxxxxxx>
Date: Fri, 25 Nov 2005 11:51:36 +0100
On Fri, Nov 25, 2005 at 08:36:47AM +0000, ronnie sahlberg wrote:
> i have made several updates to smb2 dissection and the wiki

Hi Ronnie,

can you apply this patch please?

thanks!
metze
=== epan/dissectors/packet-smb.c
==================================================================
--- epan/dissectors/packet-smb.c	(revision 888)
+++ epan/dissectors/packet-smb.c	(local)
@@ -10958,7 +10958,7 @@
 	return offset;
 }
 
-/* this dissects the SMB_QUERY_FILE_NETWORK_OPEN_INFO
+/* this dissects the SMB_FILE_ATTRIBUTE_TAG_INFO
 */
 int
 dissect_qfi_SMB_FILE_ATTRIBUTE_TAG_INFO(tvbuff_t *tvb, 
=== epan/dissectors/packet-smb2.c
==================================================================
--- epan/dissectors/packet-smb2.c	(revision 888)
+++ epan/dissectors/packet-smb2.c	(local)
@@ -2045,13 +2045,19 @@
 	/* out buffer offset/length */
 	offset = dissect_smb2_olb_length_offset(tvb, offset, &o_olb, OLB_O_UINT32_S_UINT32, hf_smb2_transaction_out_data);
 
-	/* in buffer offset/length */
-	offset = dissect_smb2_olb_length_offset(tvb, offset, &i_olb, OLB_O_UINT32_S_UINT32, hf_smb2_transaction_in_data);
+	/* out buffer */
+	dissect_smb2_olb_buffer(pinfo, tree, tvb, &o_olb, si, dissect_smb2_transaction_data);
 
 	/* some unknown bytes */
 	proto_tree_add_item(tree, hf_smb2_unknown, tvb, offset, 4, TRUE);
 	offset += 4;
 
+	/* in buffer offset/length */
+	offset = dissect_smb2_olb_length_offset(tvb, offset, &i_olb, OLB_O_UINT32_S_UINT32, hf_smb2_transaction_in_data);
+
+	/* in buffer */
+	dissect_smb2_olb_buffer(pinfo, tree, tvb, &i_olb, si, NULL);
+
 	/* max transaction in size */
 	proto_tree_add_item(tree, hf_smb2_max_transaction_in_size, tvb, offset, 4, TRUE);
 	offset += 4;
@@ -2060,12 +2066,9 @@
 	proto_tree_add_item(tree, hf_smb2_unknown, tvb, offset, 8, TRUE);
 	offset += 8;
 
-	/* out buffer */
-	dissect_smb2_olb_buffer(pinfo, tree, tvb, &o_olb, si, dissect_smb2_transaction_data);
+	offset = dissect_smb2_olb_tvb_max_offset(offset, &o_olb);
+	offset = dissect_smb2_olb_tvb_max_offset(offset, &i_olb);
 
-	/* in buffer */
-	dissect_smb2_olb_buffer(pinfo, tree, tvb, &i_olb, si, NULL);
-
 	return offset;
 }
 
@@ -2085,23 +2088,24 @@
 	/* fid */
 	offset = dissect_smb2_fid(tvb, pinfo, tree, offset, si, FID_MODE_USE);
 
-	/* out buffer offset/length */
-	offset = dissect_smb2_olb_length_offset(tvb, offset, &o_olb, OLB_O_UINT32_S_UINT32, hf_smb2_transaction_out_data);
-
 	/* in buffer offset/length */
 	offset = dissect_smb2_olb_length_offset(tvb, offset, &i_olb, OLB_O_UINT32_S_UINT32, hf_smb2_transaction_in_data);
 
-	/* some unknown bytes */
-	proto_tree_add_item(tree, hf_smb2_unknown, tvb, offset, 8, TRUE);
-	offset += 8;
+	/* in buffer */
+	dissect_smb2_olb_buffer(pinfo, tree, tvb, &i_olb, si, dissect_smb2_transaction_data);
 
+	/* out buffer offset/length */
+	offset = dissect_smb2_olb_length_offset(tvb, offset, &o_olb, OLB_O_UINT32_S_UINT32, hf_smb2_transaction_out_data);
 
 	/* out buffer */
 	dissect_smb2_olb_buffer(pinfo, tree, tvb, &o_olb, si, dissect_smb2_transaction_data);
 
-	/* in buffer */
-	dissect_smb2_olb_buffer(pinfo, tree, tvb, &i_olb, si, dissect_smb2_transaction_data);
+	/* some unknown bytes */
+	proto_tree_add_item(tree, hf_smb2_unknown, tvb, offset, 8, TRUE);
+	offset += 8;
 
+	offset = dissect_smb2_olb_tvb_max_offset(offset, &i_olb);
+	offset = dissect_smb2_olb_tvb_max_offset(offset, &o_olb);
 
 	return offset;
 }