summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/send.c
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2014-02-11 17:05:06 +0100
committerAntonio Quartulli <antonio@meshcoding.com>2014-02-17 17:17:02 +0100
commita30e22ca8464c2dc573e0144a972221c2f06c2cd (patch)
tree29cf55dd314b3025c8fa759278cbaa7c949753ec /net/batman-adv/send.c
parentb2262df7fcf2c395eca564df83238e931d88d7bf (diff)
downloadtalos-op-linux-a30e22ca8464c2dc573e0144a972221c2f06c2cd.tar.gz
talos-op-linux-a30e22ca8464c2dc573e0144a972221c2f06c2cd.zip
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 7ea7b4a142758deaf46c1af0ca9ceca6dd55138b ("batman-adv: make the TT CRC logic VLAN specific") Reported-by: Russel Senior <russell@personaltelco.net> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Tested-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/send.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud