linux/net/batman-adv
Sven Eckelmann c2f7f0e7b3 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>
2011-02-11 00:25:10 +01:00
..
aggregation.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
aggregation.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bat_debugfs.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bat_debugfs.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bat_sysfs.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bat_sysfs.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bitarray.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
bitarray.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
gateway_client.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
gateway_client.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
gateway_common.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
gateway_common.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
hard-interface.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
hard-interface.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
hash.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
hash.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
icmp_socket.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
icmp_socket.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
Kconfig
main.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
main.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
Makefile batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
originator.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
originator.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
packet.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
ring_buffer.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
ring_buffer.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
routing.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
routing.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
send.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
send.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
soft-interface.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
soft-interface.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
translation-table.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
translation-table.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
types.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
unicast.c batman-adv: Use successive sequence numbers for fragments 2011-02-11 00:25:10 +01:00
unicast.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
vis.c batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00
vis.h batman-adv: Update copyright years 2011-01-31 14:57:12 +01:00