From 29bfeccc8db0a880ad3aff282389298852c02323 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 3 Jan 2019 14:19:59 -0800 Subject: CRC6: Fixed CRC lookup table and functions * Generated code and 256-element lookup table with pycrc * Combined 2 crc6 functions which both have same poly 0x6f and lookup table * Using the example file from the bug report, $ tshark -r ~/Downloads/M1_header_crc.pcapng -V | grep "Calculated CRC" 1101 00.. = Header CRC: 0x34 [Calculated CRC 0x34] Header and Calculated CRC are now both 0x34 (correct value) * pycrc settings for generation: $ python pycrc.py --reflect-in False \ --reflect-out False \ --xor-in 0 \ --xor-out 0 \ --algorithm table-driven --width 6 \ --poly 0x2f * To manually check 3GPP protocol header CRCs, use above command with flag --check-hexstring=
Bug: 14875 Change-Id: I283f52fcae10b2f92f107df6988629d49d692428 Reviewed-on: https://code.wireshark.org/review/31356 Reviewed-by: Ross Jacobs Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/crc6-tvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan/crc6-tvb.c') diff --git a/epan/crc6-tvb.c b/epan/crc6-tvb.c index 5f3306cb68..1b044abe44 100644 --- a/epan/crc6-tvb.c +++ b/epan/crc6-tvb.c @@ -23,7 +23,7 @@ crc6_compute_tvb(tvbuff_t *tvb, int len) tvb_ensure_bytes_exist(tvb, 0, len); /* len == -1 not allowed */ buf = tvb_get_ptr(tvb, 0, len); - return crc6_compute(buf, len); + return crc6_0X6F(0, buf, len); } /* -- cgit v1.2.3