smb2: pass down payload length

in the case of compounded packets, there might be more packets after
the reparse data.

Change-Id: Ife820271be3f7443b352b4c0f75f10d1a0624699
Reviewed-on: https://code.wireshark.org/review/32312
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Aurelien Aptel 2019-03-04 14:55:29 +01:00 committed by Anders Broman
parent daf29e2bde
commit dfa2c06e79

View file

@ -6797,7 +6797,7 @@ dissect_smb2_FSCTL_SRV_COPYCHUNK(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
}
static void
dissect_smb2_reparse_nfs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset)
dissect_smb2_reparse_nfs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, guint32 length)
{
guint64 type;
int symlink_length;
@ -6807,7 +6807,7 @@ dissect_smb2_reparse_nfs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
type = tvb_get_letoh64(tvb, offset);
proto_tree_add_item(tree, hf_smb2_nfs_type, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
bytes_left = tvb_captured_length_remaining(tvb, offset);
bytes_left = length;
switch (type) {
case NFS_SPECFILE_LNK:
@ -6893,7 +6893,7 @@ dissect_smb2_FSCTL_REPARSE_POINT(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
dissect_smb2_olb_off_string(pinfo, tree, tvb, &p_olb, offset, OLB_TYPE_UNICODE_STRING);
break;
case REPARSE_TAG_NFS:
dissect_smb2_reparse_nfs(tvb, pinfo, tree, offset);
dissect_smb2_reparse_nfs(tvb, pinfo, tree, offset, length);
break;
default:
proto_tree_add_item(tree, hf_smb2_unknown, tvb, offset, length, ENC_NA);