forked from osmocom/wireshark
LLDP: TIA Network Policy Unknown Policy Flag Decode is not correct
Wrong length for field... Bug:10512 Change-Id: I416a34d5f50cc0e842612a084c95d885eea68ef1 Reviewed-on: https://code.wireshark.org/review/4377 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
41ef2b01cd
commit
39c51be8ce
|
@ -2412,38 +2412,28 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 o
|
|||
tlvLen--;
|
||||
|
||||
/* Get flags */
|
||||
if (tlvLen < 2)
|
||||
if (tlvLen < 3)
|
||||
{
|
||||
proto_tree_add_expert(tree, pinfo, &ei_lldp_bad_length , tvb, offset, tlvLen);
|
||||
return;
|
||||
}
|
||||
|
||||
proto_tree_add_item(tree, hf_media_policy_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_media_tag_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_media_policy_flag, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_media_tag_flag, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Get vlan id */
|
||||
proto_tree_add_item(tree, hf_media_vlan_id, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_media_vlan_id, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
|
||||
offset++;
|
||||
tlvLen--;
|
||||
|
||||
/* Get L2 priority */
|
||||
if (tlvLen < 1)
|
||||
{
|
||||
proto_tree_add_expert(tree, pinfo, &ei_lldp_bad_length , tvb, offset, tlvLen);
|
||||
return;
|
||||
}
|
||||
|
||||
proto_tree_add_item(tree, hf_media_l2_prio, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
offset++;
|
||||
tlvLen--;
|
||||
proto_tree_add_item(tree, hf_media_l2_prio, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Get DSCP value */
|
||||
proto_tree_add_item(tree, hf_media_dscp, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_media_dscp, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
|
||||
offset++;
|
||||
tlvLen--;
|
||||
offset += 3;
|
||||
tlvLen -= 3;
|
||||
break;
|
||||
}
|
||||
case 3: /* Location Identification */
|
||||
|
|
Loading…
Reference in New Issue