Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
batman-adv: fix TT CRC computation by ensuring byte order
When computing the CRC on a 2byte variable the order of the bytes obviously alters the final result. This means that computing the CRC over the same value on two archs having different endianess leads to different numbers. The global and local translation table CRC computation routine makes this mistake while processing the clients VIDs. The result is a continuous CRC mismatching between nodes having different endianess. Fix this by converting the VID to Network Order before processing it. This guarantees that every node uses the same byte order. Introduced by 7ea7b4a ("batman-adv: make the TT CRC logic VLAN specific") Reported-by: Russel Senior <[email protected]> Signed-off-by: Antonio Quartulli <[email protected]> Tested-by: Russell Senior <[email protected]> Signed-off-by: Marek Lindner <[email protected]>
- Loading branch information