summaryrefslogtreecommitdiff
path: root/net/batman-adv/routing.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2011-02-10 14:33:56 (GMT)
committerSven Eckelmann <sven@narfation.org>2011-02-10 23:25:10 (GMT)
commitc2f7f0e7b3ce55eee32892d6aa5cd88a7512ea25 (patch)
tree93be054cc3f80e20e704bafa6073fd8b44e89514 /net/batman-adv/routing.h
parent091b948306d2628320e77977eb7ae4a757b12180 (diff)
downloadlinux-c2f7f0e7b3ce55eee32892d6aa5cd88a7512ea25.tar.xz
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.h')
0 files changed, 0 insertions, 0 deletions