batman-adv: make broadcast seqno operations atomic
authorMarek Lindner <lindner_marek@yahoo.de>
Tue, 25 Jan 2011 21:52:11 +0000 (21:52 +0000)
committerMarek Lindner <lindner_marek@yahoo.de>
Sat, 5 Mar 2011 11:50:09 +0000 (12:50 +0100)
commitf3e0008f01b275bd08bd416cfcaa7021dd6bc277
tree47c1787dce5d3bda821a4ccb015d54b6b9cadc82
parent0ede9f41b217d8982ab426e3c8c1b692a280a16f
batman-adv: make broadcast seqno operations atomic

Batman-adv could receive several payload broadcasts at the same time
that would trigger access to the broadcast seqno sliding window to
determine whether this is a new broadcast or not. If these incoming
broadcasts are accessing the sliding window simultaneously it could
be left in an inconsistent state. Therefore it is necessary to make
sure this access is atomic.

Reported-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
net/batman-adv/originator.c
net/batman-adv/routing.c
net/batman-adv/types.h