Skip to content
Commit a30e22ca authored by Antonio Quartulli's avatar Antonio Quartulli Committed by Antonio Quartulli
Browse files

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 7ea7b4a1
("batman-adv: make the TT CRC logic VLAN specific")

Reported-by: default avatarRussel Senior <russell@personaltelco.net>
Signed-off-by: default avatarAntonio Quartulli <antonio@open-mesh.com>
Tested-by: default avatarRussell Senior <russell@personaltelco.net>
Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
parent b2262df7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment