batman-adv: fix soft-interface MTU computation
authorAntonio Quartulli <antonio@meshcoding.com>
Tue, 21 Jan 2014 10:22:05 +0000 (11:22 +0100)
committerAntonio Quartulli <antonio@meshcoding.com>
Mon, 17 Feb 2014 16:17:00 +0000 (17:17 +0100)
commit930cd6e46eadce8b8ed2a232ee536e5fd286c152
tree57aeaea9f7bd587f1cb6d56f088d0a262e47c180
parent0fd5d57ba3456c4d0b77d1ae64be4818b47d7545
batman-adv: fix soft-interface MTU computation

The current MTU computation always returns a value
smaller than 1500bytes even if the real interfaces
have an MTU large enough to compensate the batman-adv
overhead.

Fix the computation by properly returning the highest
admitted value.

Introduced by a19d3d85e1b854e4a483a55d740a42458085560d
("batman-adv: limit local translation table max size")

Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
net/batman-adv/hard-interface.c