]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: limit local translation table max size
authorMarek Lindner <lindner_marek@yahoo.de>
Mon, 27 May 2013 07:33:25 +0000 (15:33 +0800)
committerAntonio Quartulli <antonio@meshcoding.com>
Wed, 23 Oct 2013 15:03:43 +0000 (17:03 +0200)
commit8638f22b6c01ba2347f85a00278a1edcad4a6765
treea289948258c78d0ea968059ab432046ac2938d56
parent0b25b14b391d1c8398be31a47de27b97a6162f65
batman-adv: limit local translation table max size

The local translation table size is limited by what can be
transferred from one node to another via a full table request.

The number of entries fitting into a full table request depend
on whether the fragmentation is enabled or not. Therefore this
patch introduces a max table size check and refuses to add
more local clients when that size is reached. Moreover, if the
max full table packet size changes (MTU change or fragmentation
is disabled) the local table is downsized instantaneously.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
net/batman-adv/hard-interface.c
net/batman-adv/soft-interface.c
net/batman-adv/translation-table.c
net/batman-adv/translation-table.h
net/batman-adv/types.h