From 54719a7a0ad247c37d91f40cb2be831a02e06df2 Mon Sep 17 00:00:00 2001 From: etxrab Date: Tue, 24 Aug 2010 05:38:49 +0000 Subject: From Christian Durrer: Not all Ether-S-Bus telegrams are recognized and displayed correctly. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5123 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33903 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-sbus.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'epan/dissectors/packet-sbus.c') diff --git a/epan/dissectors/packet-sbus.c b/epan/dissectors/packet-sbus.c index f6a4b0fd67..013c019321 100644 --- a/epan/dissectors/packet-sbus.c +++ b/epan/dissectors/packet-sbus.c @@ -624,7 +624,7 @@ is_sbus_pdu(tvbuff_t *tvb) return (FALSE); } /* Sixth byte indicates protocol type and must be 0*/ - if ( tvb_get_guint8(tvb, 5) != 0x00 ) { + if ( tvb_get_guint8(tvb, 5) > 0x01 ) { return (FALSE); } /* Seventh and eigth byte indicates the packet sequence number and can @@ -1851,6 +1851,13 @@ dissect_sbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset = offset + sbus_helper; break; } + } else if (sbus_attribut == SBUS_RESPONSE && (!request_val)) { + /*calculate the offset in case the request telegram was not found or was broadcasted*/ + sbus_eth_len = tvb_get_ntohl(tvb,0); + sbus_helper = sbus_eth_len - 11; + proto_tree_add_text(sbus_tree, tvb, offset, sbus_helper, + "Not dissected, could not find request telegram"); + offset = sbus_eth_len - 2; } if (sbus_attribut == SBUS_ACKNAK) { -- cgit v1.2.3