Skip to contentSkip to conversation

bridge: reset bridge mtu after deleting an interface

PATCH Applied Venkat Venkatsubra 3 participants 3 messages Mar 13, 2015 – Mar 14, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge: reset bridge mtu after deleting an interface

On adding an interface br_add_if() sets the MTU to the min of all the interfaces. Do the same thing on removing an interface too in br_del_if.

---
 net/bridge/br_if.c | 2 ++
 1 file changed, 2 insertions(+)
net/bridge/br_if.c +2 -0
index b087d27..1849d96 100644
@@ -563,6 +563,8 @@ int br_del_if(struct net_bridge *br, struct net_device *dev)
 	 */
 	del_nbp(p);
 
+	dev_set_mtu(br->dev, br_min_mtu(br));
+
 	spin_lock_bh(&br->lock);
 	changed_addr = br_stp_recalculate_bridge_id(br);
 	spin_unlock_bh(&br->lock);
Signature · 1 line
1.8.2.1
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Venkat Venkatsubra

On adding an interface br_add_if() sets the MTU to the min of all the interfaces. Do the same thing on removing an interface too in br_del_if.

---
  net/bridge/br_if.c | 2 ++
  1 file changed, 2 insertions(+)
net/bridge/br_if.c +0 -0
index b087d27..1849d96 100644

net/bridge/br_if.c int br_del_if(struct net_bridge *br, struct net_device *dev) · line 570

Quoted 8 lines
net/bridge/br_if.c +2 -0
@@ -563,6 +563,8 @@ int br_del_if(struct net_bridge *br, struct net_device *dev)
  	 */
  	del_nbp(p);
 
+	dev_set_mtu(br->dev, br_min_mtu(br));
+
  	spin_lock_bh(&br->lock);
  	changed_addr = br_stp_recalculate_bridge_id(br);
  	spin_unlock_bh(&br->lock);

This looks good to me.

maintainer Applied
#2 lore raw

From: roopa <[email protected]>
Date: Fri, 13 Mar 2015 19:12:52 -0700

Quoted 25 lines · Venkat Venkatsubra
Quoted 14 lines

On adding an interface br_add_if() sets the MTU to the min of all the interfaces. Do the same thing on removing an interface too in br_del_if.

---
  net/bridge/br_if.c | 2 ++
  1 file changed, 2 insertions(+)
net/bridge/br_if.c +0 -0
index b087d27..1849d96 100644

net/bridge/br_if.c int br_del_if(struct net_bridge *br, struct · line 570

Quoted 8 lines
net/bridge/br_if.c +1 -0
@@ -563,6 +563,8 @@ int br_del_if(struct net_bridge *br, struct
 net_device *dev)
  	 */
  	del_nbp(p);
  +	dev_set_mtu(br->dev, br_min_mtu(br));
+
  	spin_lock_bh(&br->lock);
  	changed_addr = br_stp_recalculate_bridge_id(br);
  	spin_unlock_bh(&br->lock);

This looks good to me.

Quoted 1 line

Applied, thanks everyone.