batman-adv: use CRC32C instead of CRC16 in TT code
CRC32C has to be preferred to CRC16 because of its possible HW native support and because of the reduced collision probability. With this change the Translation Table component now uses CRC32C to compute the local and global table checksum. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
This commit is contained in:

committed by
Antonio Quartulli

parent
122edaa059
commit
ced72933a5
@@ -345,12 +345,14 @@ struct batadv_tvlv_gateway_data {
|
||||
* struct batadv_tvlv_tt_data - tt data propagated through the tt tvlv container
|
||||
* @flags: translation table flags (see batadv_tt_data_flags)
|
||||
* @ttvn: translation table version number
|
||||
* @crc: crc16 checksum of the local translation table
|
||||
* @reserved: field reserved for future use
|
||||
* @crc: crc32 checksum of the local translation table
|
||||
*/
|
||||
struct batadv_tvlv_tt_data {
|
||||
uint8_t flags;
|
||||
uint8_t ttvn;
|
||||
__be16 crc;
|
||||
uint16_t reserved;
|
||||
__be32 crc;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user