diff options
author | Anders Broman <anders.broman@ericsson.com> | 2005-12-16 16:37:03 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2005-12-16 16:37:03 +0000 |
commit | 6f23144e461c68cd7f3d0d2565252d86875be98d (patch) | |
tree | bcea48993cd654983b53195ec4a8876e86232df2 /epan/dissectors/packet-lldp.c | |
parent | 9269a3b4f2b9450d6399296aea84a4646249d677 (diff) |
From Jaap Keuter:
- Editcap
Mikko Tiihonen filed bug 379 including a patch for editcap. This wasn't picked up so far. I've ported the patch to svn 16820 and included a documentation patch.
-packet-ieee80211.c
Radek Vokal of RedHat filed a bug found by Vladimir Kondratiev of Intel in the 802.11 dissector. Radek provided a sample capture and Vladimir a oneliner patch. I've ported the patch to svn 16820 and tested it against the provided capture. Works well.
-From Kan Sasaki
A patch for packet-ospf.c is attached:
- Fix the handling of the DN-bit of options field.
- Add a new function dissect_ospf_bitfield() to dissect a bitfield
such as options, flags. The following functions are merged by
using this function.
- dissect_ospf_lls_extended_options()
- dissect_ospf_dbd()
- dissect_ospf_options()
- dissect_ospf_v3_prefix_options()
- dissect the flags and prefix-options bitfield.
- lldp Bugfix Bug 596 LLDP TIA Network Policy Decode is not correct
- Camel make it possible to dissect based on OID.
svn path=/trunk/; revision=16822
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r-- | epan/dissectors/packet-lldp.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index 924591177f..d9702a3fe0 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -1593,32 +1593,24 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint tlvLen--; /* Get flags */ - if (tlvLen < 1) + if (tlvLen < 2) { proto_tree_add_text(tree, tvb, tempOffset, 0, "TLV too short"); return; } - tempByte = tvb_get_guint8(tvb, tempOffset); + tempShort = tvb_get_ntohs(tvb, tempOffset); /* Unknown policy flag */ if (tree) - proto_tree_add_text(tree, tvb, tempOffset, 1, "%s", - decode_boolean_bitfield(tempByte, 0x80, 8,"Policy: Unknown", "Policy: Defined")); + proto_tree_add_text(tree, tvb, tempOffset, 2, "%s", + decode_boolean_bitfield(tempShort, 0x8000, 16,"Policy: Unknown", "Policy: Defined")); /* Tagged flag */ if (tree) - proto_tree_add_text(tree, tvb, tempOffset, 1, "%s", - decode_boolean_bitfield(tempByte, 0x40, 8,"Tagged: Yes", "Tagged: No")); - tempOffset++; - tlvLen--; + proto_tree_add_text(tree, tvb, tempOffset, 2, "%s", + decode_boolean_bitfield(tempShort, 0x4000, 16,"Tagged: Yes", "Tagged: No")); /* Get vlan id */ - if (tlvLen < 1) - { - proto_tree_add_text(tree, tvb, tempOffset, 0, "TLV too short"); - return; - } - tempShort = tvb_get_ntohs(tvb, tempOffset); tempVLAN = (tempShort & 0x1FFE) >> 1; if (tree) proto_tree_add_text(tree, tvb, tempOffset, 2, "%s %u", |