Fix ERSPAN type II and type III offset.

For ERSPAN type II (version == 1), the offset is shifted by 4 at the
end. As a result, the 'offset+=2' at the end of ERSPAN type III should
be in its own 'else' scope.

Change-Id: I64a55d5722e3f4f5672ca2a4228583b3b51559e1
Reviewed-on: https://code.wireshark.org/review/16568
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
William Tu 2016-07-20 21:38:47 -07:00 committed by Anders Broman
parent 3dbc84414e
commit e3a15cfbb2
1 changed files with 2 additions and 7 deletions

View File

@ -201,8 +201,7 @@ dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
if (version == 2) {
else {
proto_tree_add_item(erspan_tree, hf_erspan_timestamp, tvb,
offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@ -228,13 +227,9 @@ dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
proto_tree_add_item(erspan_tree, hf_erspan_o, tvb,
offset, 2, ENC_BIG_ENDIAN);
offset += 2;
}
offset += 2;
}
else {
offset += 8;