Staging: batman-adv: 32bit sequence number and TTL for broadcasts
authorSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Mon, 21 Jun 2010 23:25:51 +0000 (01:25 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jun 2010 21:05:06 +0000 (14:05 -0700)
commitcf2d72ec5c66ac3ebe9d28c3d88314a958cc180e
tree186fd2f2f9bc7d08f4e25d7d503cd9192997b0a3
parent6856ba1f44522b381c9a60b7972dd0fb52c54093
Staging: batman-adv: 32bit sequence number and TTL for broadcasts

This patch changes the sequence number range from 8 or 16 bit to 32 bit.
This should avoid problems with the sequence number sliding window algorithm
which we had seen in the past for broadcast floods or malicious packet
injections. We can not assure 100% security with this patch, but it is quite
an improvement over the old 16 bit sequence numbers:

 * expected window size can be increased (4096 -> 65536)
 * 64k packets in the right order would now be needed to cause a loop,
   which seems practically impossible.

Furthermore, a TTL field has been added to the broadcast packet type, just to
make sure.

These changes required to increase the compatibility level once again.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Change atomic64_* back to atomic_*, Rework on
top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/aggregation.c
drivers/staging/batman-adv/bitarray.c
drivers/staging/batman-adv/bitarray.h
drivers/staging/batman-adv/main.h
drivers/staging/batman-adv/packet.h
drivers/staging/batman-adv/routing.c
drivers/staging/batman-adv/send.c
drivers/staging/batman-adv/soft-interface.c
drivers/staging/batman-adv/types.h
drivers/staging/batman-adv/vis.c