aboutsummaryrefslogtreecommitdiff
path: root/block/blk-map.c
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2014-02-11 17:05:06 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-06 22:06:16 -0800
commit176890fa4f29c7dbbbe6a6d5eb761d8c064c1efa (patch)
treed8f40b503d99fb5c53a2df9d708bb275bc643d3c /block/blk-map.c
parent456252dff8921cbd59a6ccd88016d49130d974ba (diff)
batman-adv: fix TT CRC computation by ensuring byte order
[ Upstream commit a30e22ca8464c2dc573e0144a972221c2f06c2cd ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/blk-map.c')
0 files changed, 0 insertions, 0 deletions