summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-atm.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-05-03 15:09:11 -0700
committerGuy Harris <guy@alum.mit.edu>2015-05-03 22:09:56 +0000
commit85d3b61edb7d5f683a7747a498b512cf9ded37fd (patch)
tree91be68326279ae6809328c8419d2658dac7044a6 /epan/dissectors/packet-atm.c
parent0d6581c152cf57bac655414862db92a5a66d83b2 (diff)
downloadwireshark-85d3b61edb7d5f683a7747a498b512cf9ded37fd.tar.gz
Don't dissect otherwise-undissected data twice.
Also, set decoded to TRUE after we return from a dissector; that makes it a bit clearer when we're setting it. Change-Id: Ief3e999c72954e08d4608b15b49921da294807c1 Reviewed-on: https://code.wireshark.org/review/8284 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-atm.c')
-rw-r--r--epan/dissectors/packet-atm.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index d1cbedb12e..17993c6c71 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -1002,16 +1002,17 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 octet[8];
tvb_memcpy(next_tvb, octet, 0, sizeof(octet));
- decoded = TRUE;
if (octet[0] == 0xaa
&& octet[1] == 0xaa
&& octet[2] == 0x03) /* LLC SNAP as per RFC2684 */
{
call_dissector(llc_handle, next_tvb, pinfo, tree);
+ decoded = TRUE;
}
else if ((pntoh16(octet) & 0xff) == PPP_IP)
{
call_dissector(ppp_handle, next_tvb, pinfo, tree);
+ decoded = TRUE;
}
else if (pntoh16(octet) == 0x00)
{
@@ -1019,6 +1020,7 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_item(tree, hf_atm_padding, tvb, 0, 2, ENC_NA);
next_tvb = tvb_new_subset_remaining(tvb, 2);
call_dissector(eth_handle, next_tvb, pinfo, tree);
+ decoded = TRUE;
}
else if (octet[2] == 0x03 && /* NLPID */
((octet[3] == 0xcc || /* IPv4 */
@@ -1028,6 +1030,7 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
{
/* assume network interworking with FR 2 byte header */
call_dissector(fr_handle, next_tvb, pinfo, tree);
+ decoded = TRUE;
}
else if (octet[4] == 0x03 && /* NLPID */
((octet[5] == 0xcc || /* IPv4 */
@@ -1037,23 +1040,16 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
{
/* assume network interworking with FR 4 byte header */
call_dissector(fr_handle, next_tvb, pinfo, tree);
+ decoded = TRUE;
}
else if (((octet[0] & 0xf0)== 0x40) ||
((octet[0] & 0xf0) == 0x60))
{
call_dissector(ip_handle, next_tvb, pinfo, tree);
- }
- else
- {
- decoded = FALSE;
+ decoded = TRUE;
}
}
}
-
- if (!decoded) {
- /* Dump it as raw data. */
- call_dissector(data_handle, next_tvb, pinfo, tree);
- }
break;
}
break;