batman-adv: Don't increase MTU when set by user
authorSven Eckelmann <sven@narfation.org>
Wed, 19 Jul 2023 08:01:15 +0000 (10:01 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Thu, 20 Jul 2023 06:56:33 +0000 (08:56 +0200)
commitd8e42a2b0addf238be8b3b37dcd9795a5c1be459
tree7a924dee56384688c67262dd48691abbe62f5744
parentc6a953cce8d0438391e6da48c8d0793d3fbfcfa6
batman-adv: Don't increase MTU when set by user

If the user set an MTU value, it usually means that there are special
requirements for the MTU. But if an interface gots activated, the MTU was
always recalculated and then the user set value was overwritten.

The only reason why this user set value has to be overwritten, is when the
MTU has to be decreased because batman-adv is not able to transfer packets
with the user specified size.

Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol")
Cc: stable@vger.kernel.org
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/hard-interface.c
net/batman-adv/soft-interface.c
net/batman-adv/types.h