diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-08-24 05:38:49 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-08-24 05:38:49 +0000 |
commit | 54719a7a0ad247c37d91f40cb2be831a02e06df2 (patch) | |
tree | b321f232038be097db9061df7aa2b29cdf03e06c | |
parent | 05cec823a72cec2076038019ab30a65297b0bc81 (diff) |
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
-rw-r--r-- | epan/dissectors/packet-sbus.c | 9 |
1 files changed, 8 insertions, 1 deletions
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) { |