aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-opensafety.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2013-07-01 14:20:17 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2013-07-01 14:20:17 +0000
commitee52f06db9de9cc4533ca279caa2eb1f67fff93e (patch)
treeed320d15420f3f6a13ff1b8d11742d145aa544df /epan/dissectors/packet-opensafety.c
parent97b4bbcab736ecf7a4b069b62381b41bdc451810 (diff)
From Roland Knall via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8877 :
In my last patch (bug #8847), I overlooked a place where I had to check for the old CRC as well, which led to packages that were not detected anymore. This 4 lines fix it. As usual, the patch was tested and works. svn path=/trunk/; revision=50294
Diffstat (limited to 'epan/dissectors/packet-opensafety.c')
-rw-r--r--epan/dissectors/packet-opensafety.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c
index 8a43460026..101fe8b504 100644
--- a/epan/dissectors/packet-opensafety.c
+++ b/epan/dissectors/packet-opensafety.c
@@ -775,7 +775,11 @@ static guint8 findSafetyFrame ( tvbuff_t * message_tvb, guint u_Offset, gboolean
crcOffset = 1;
if ( crc != 0x00 )
+ {
calcCrc = crc16_0x755B( bytes, b_Length + 4, 0 );
+ if ( ( crc ^ calcCrc ) != 0 )
+ calcCrc = crc16_0x5935( bytes, b_Length + 4, 0 );
+ }
} else {
if ( crc != 0x00 )
calcCrc = crc8_0x2F ( bytes, b_Length + 4, 0 );