diff options
author | Sven Eckelmann <sven@narfation.org> | 2023-07-19 10:01:15 +0200 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2023-07-20 08:56:33 +0200 |
commit | d8e42a2b0addf238be8b3b37dcd9795a5c1be459 (patch) | |
tree | 7a924dee56384688c67262dd48691abbe62f5744 /net/batman-adv/types.h | |
parent | c6a953cce8d0438391e6da48c8d0793d3fbfcfa6 (diff) | |
download | lwn-d8e42a2b0addf238be8b3b37dcd9795a5c1be459.tar.gz lwn-d8e42a2b0addf238be8b3b37dcd9795a5c1be459.zip |
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>
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r-- | net/batman-adv/types.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index ca9449ec9836..cf1a0eafe3ab 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -1547,6 +1547,12 @@ struct batadv_priv { struct net_device *soft_iface; /** + * @mtu_set_by_user: MTU was set once by user + * protected by rtnl_lock + */ + int mtu_set_by_user; + + /** * @bat_counters: mesh internal traffic statistic counters (see * batadv_counters) */ |