lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Jan 2014 17:43:56 +0800
From:	Ding Tianhong <>
To:	Jay Vosburgh <>,
	Veaceslav Falico <>,
	Andy Gospodarek <>,
	"David S. Miller" <>,
	Netdev <>
Subject: [PATCH net-next] bonding: do't permit slaves to change their mtu

I have come to a conclusion by testing every mode for mtu changing:

1). If the slaves support changing mtu and no need to restart the device,
    just like virtual nic, the master will not lost any packages for every

2). If the slaves support changing mtu and need to restart the device,
    just like Intel 82599, the AB, 802.3, ALB and TLB mode may lost
    packages, but other modes could work well.

The reason is that when the slave's mtu has been changed, the slave will
restart, if the slave is current active slave, the master may set the
slave to backup state and reselect a new slave, after the reselect processing,
the master could work again, but if in load-balance mode, the master could
select another active slave to send and recv packages.

So the best way to fix the problem is don't permit slave to change their
mtu independently.

Cc: Jay Vosburgh <>
Cc: Veaceslav Falico <>
Cc: Andy Gospodarek <>
Signed-off-by: Ding Tianhong <>
 drivers/net/bonding/bond_main.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2ca949f..e127031c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2808,20 +2808,12 @@ static int bond_slave_netdev_event(unsigned long event,
 		 * ... Or is it this?
-		/*
-		 * TODO: Should slaves be allowed to
-		 * independently alter their MTU?  For
-		 * an active-backup bond, slaves need
-		 * not be the same type of device, so
-		 * MTUs may vary.  For other modes,
-		 * slaves arguably should have the
-		 * same MTUs. To do this, we'd need to
-		 * take over the slave's change_mtu
-		 * function for the duration of their
-		 * servitude.
+		/* The master and slaves should have the
+		 * same mtu, so don't permit slaves to
+		 * change their mtu independently.
-		break;
+		return NOTIFY_BAD;
 		/* we don't care if we don't have primary set */
 		if (!USES_PRIMARY(bond->params.mode) ||

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists