summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2023-07-19 10:29:29 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-30 17:23:15 +0300
commit480f2a129d8d38c352f520bc9412cf1aa746ac22 (patch)
treedc69d6f1d374cba4d7f1975bd38fc5f2e69c1f82 /net
parent0dbedf9afee329a548e78775bf921e6e0a0d3594 (diff)
downloadlinux-480f2a129d8d38c352f520bc9412cf1aa746ac22.tar.xz
batman-adv: Trigger events for auto adjusted MTU
commit c6a953cce8d0438391e6da48c8d0793d3fbfcfa6 upstream. If an interface changes the MTU, it is expected that an NETDEV_PRECHANGEMTU and NETDEV_CHANGEMTU notification events is triggered. This worked fine for .ndo_change_mtu based changes because core networking code took care of it. But for auto-adjustments after hard-interfaces changes, these events were simply missing. Due to this problem, non-batman-adv components weren't aware of MTU changes and thus couldn't perform their own tasks correctly. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/hard-interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index fe0898a9b4e8..51a82379ac5e 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -632,7 +632,7 @@ out:
*/
void batadv_update_min_mtu(struct net_device *soft_iface)
{
- soft_iface->mtu = batadv_hardif_min_mtu(soft_iface);
+ dev_set_mtu(soft_iface, batadv_hardif_min_mtu(soft_iface));
/* Check if the local translate table should be cleaned up to match a
* new (and smaller) MTU.