summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-atm.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-06-24 23:56:27 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-06-24 23:56:27 +0000
commit342812d0ee727f93a7804dacc237a2babcb7fa8f (patch)
tree974a4eb30f0071bd82bccf15d09383f554b5b69b /epan/dissectors/packet-atm.c
parent753d90e57e4946110bfd5faf0468314aa35cd604 (diff)
downloadwireshark-342812d0ee727f93a7804dacc237a2babcb7fa8f.tar.gz
From Yair:
1. OAM cells are not automatically detected if the AAL type passed is AAL_UNKNOWN. 2. CRC10 calculation does not take into account the "crc_stripped" option, and uses a hardcoded offset of 5 bytes into the cell. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7385 svn path=/trunk/; revision=43471
Diffstat (limited to 'epan/dissectors/packet-atm.c')
-rw-r--r--epan/dissectors/packet-atm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index da6173b300..d8d2de2c74 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -1685,7 +1685,7 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* XXX - do this for all AAL values, overriding whatever information
* Wiretap got from the file?
*/
- if (aal == AAL_USER) {
+ if (aal == AAL_USER || aal == AAL_UNKNOWN) {
if (atm_is_oam_cell(vci,pt)) {
aal = AAL_OAMCELL;
}
@@ -1731,6 +1731,9 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
(aal3_4_hdr >> 10) & 0xF);
proto_tree_add_text(aal_tree, tvb, offset, 2, "Multiplex ID: %u",
aal3_4_hdr & 0x3FF);
+ length = tvb_length_remaining(tvb, offset);
+ crc10 = update_crc10_by_bytes(0, tvb_get_ptr(tvb, offset, length),
+ length);
offset += 2;
proto_tree_add_text(aal_tree, tvb, offset, 44, "Information");
@@ -1739,9 +1742,6 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
aal3_4_trlr = tvb_get_ntohs(tvb, offset);
proto_tree_add_text(aal_tree, tvb, offset, 2, "Length Indicator: %u",
(aal3_4_trlr >> 10) & 0x3F);
- length = tvb_length_remaining(tvb, 5);
- crc10 = update_crc10_by_bytes(0, tvb_get_ptr(tvb, 5, length),
- length);
proto_tree_add_text(aal_tree, tvb, offset, 2, "CRC: 0x%03x (%s)",
aal3_4_trlr & 0x3FF,
(crc10 == 0) ? "correct" : "incorrect");
@@ -1785,14 +1785,14 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
octet & 0x0F);
break;
}
+ length = tvb_length_remaining(tvb, offset);
+ crc10 = update_crc10_by_bytes(0, tvb_get_ptr(tvb, offset, length),
+ length);
offset += 1;
proto_tree_add_text(aal_tree, tvb, offset, 45, "Function-specific information");
offset += 45;
- length = tvb_length_remaining(tvb, 5);
- crc10 = update_crc10_by_bytes(0, tvb_get_ptr(tvb, 5, length),
- length);
oam_crc = tvb_get_ntohs(tvb, offset);
proto_tree_add_text(aal_tree, tvb, offset, 2, "CRC-10: 0x%03x (%s)",
oam_crc & 0x3FF,