summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2011-02-10 14:33:56 +0000
committerSven Eckelmann <sven@narfation.org>2011-02-11 00:25:10 +0100
commitc2f7f0e7b3ce55eee32892d6aa5cd88a7512ea25 (patch)
tree93be054cc3f80e20e704bafa6073fd8b44e89514 /net/batman-adv/routing.c
parent091b948306d2628320e77977eb7ae4a757b12180 (diff)
downloadop-kernel-dev-c2f7f0e7b3ce55eee32892d6aa5cd88a7512ea25.zip
op-kernel-dev-c2f7f0e7b3ce55eee32892d6aa5cd88a7512ea25.tar.gz
batman-adv: Use successive sequence numbers for fragments
The two fragments of an unicast packet must have successive sequence numbers to allow the receiver side to detect matching fragments and merge them again. The current implementation doesn't provide that property because a sequence of two atomic_inc_return may be interleaved with another sequence which also changes the variable. The access to the fragment sequence number pool has either to be protected by correct locking or it has to reserve two sequence numbers in a single fetch. The latter one can easily be done by increasing the value of the last used sequence number by 2 in a single step. The generated window of two currently unused sequence numbers can now be scattered across the two fragments. Reported-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/routing.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud