Skip to content

Commit 9de5b3f

Browse files
ecsvFishwaldo
authored andcommitted
batman-adv: Trigger events for auto adjusted MTU
commit c6a953c 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: c6c8fea ("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>
1 parent 4f1f7bb commit 9de5b3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/batman-adv/hard-interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ int batadv_hardif_min_mtu(struct net_device *soft_iface)
627627
*/
628628
void batadv_update_min_mtu(struct net_device *soft_iface)
629629
{
630-
soft_iface->mtu = batadv_hardif_min_mtu(soft_iface);
630+
dev_set_mtu(soft_iface, batadv_hardif_min_mtu(soft_iface));
631631

632632
/* Check if the local translate table should be cleaned up to match a
633633
* new (and smaller) MTU.

0 commit comments

Comments
 (0)