aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-08-24 05:38:49 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-08-24 05:38:49 +0000
commit5371cb66b98073544522bac59302d250c3d8a47b (patch)
treeb321f232038be097db9061df7aa2b29cdf03e06c /epan
parent7e8752c70c6e88bcd2704fcbbaac5e47f9eb1329 (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 svn path=/trunk/; revision=33903
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-sbus.c9
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) {