The user usually sets a mtu by hand and don't want to have software to change it automatically. This is only needed when we must reduce the mtu due to a low mtu of an active slave device, but we should not increase it when any other action is made on the system related to the used interfaces.
Signed-off-by: Sven Eckelmann <[email protected]> --- batman-adv/hard-interface.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/batman-adv/hard-interface.c b/batman-adv/hard-interface.c index ee02050..eb26026 100644 --- a/batman-adv/hard-interface.c +++ b/batman-adv/hard-interface.c @@ -201,7 +201,7 @@ void update_min_mtu(struct net_device *soft_iface) int min_mtu; min_mtu = hardif_min_mtu(soft_iface); - if (soft_iface->mtu != min_mtu) + if (soft_iface->mtu > min_mtu) soft_iface->mtu = min_mtu; } @@ -241,8 +241,6 @@ static void hardif_deactivate_interface(struct batman_if *batman_if) bat_info(batman_if->soft_iface, "Interface deactivated: %s\n", batman_if->net_dev->name); - - update_min_mtu(batman_if->soft_iface); } int hardif_enable_interface(struct batman_if *batman_if, char *iface_name) -- 1.7.1
