]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Set MTU on bond master as opposed to a bond slave 277/head
authorImran Haider <imran1008@gmail.com>
Sun, 3 Sep 2017 03:25:21 +0000 (23:25 -0400)
committerImran Haider <imran1008@gmail.com>
Sun, 3 Sep 2017 04:15:37 +0000 (00:15 -0400)
Prior to this commit, the MTU setting was applied to a bond slave
interface.  In older versions of the Linux kernel, this setting
propagated to the bond master and the other bond slaves associated with
the master.  In recent versions of the kernel (observed in Linux 4.12),
increasing the MTU of a slave does not automatically increase the MTU of
the master.  This allows for more flexibility but requires the MTU of
the master to be changed manually.

Ideally, the MTU setting should be applied to the bond master and the
setting will propagate to the bond slaves, since the slaves are required
to have a MTU that is greater than or equal to the bond master.

modules.d/40network/ifup.sh

index 687b5707ff3fac9d60480dc15b0985ae703d829c..0db3c0213957d3a634b0517670cd2e9930b591e2 100755 (executable)
@@ -257,7 +257,7 @@ if [ -z "$NO_BOND_MASTER" ]; then
             done
 
             # Set mtu on bond master
-            [ -n "$bondmtu" ] && ip link set mtu $bondmtu dev $netif
+            [ -n "$bondmtu" ] && ip link set mtu $bondmtu dev $bondname
 
             # add the bits to setup the needed post enslavement parameters
             for arg in $bondoptions ; do