Commit 431ce3dd authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[BRIDGE]: Propagate bridge internal MTU changes

Need to propagate MTU changes that the bridge does to it's pseudo interface
up to others. There ends up being a double call to br_min_mtu() but that's
harmless.

Cleans up the EXPORT_SYMBOLS including dev_change_flags which is used by vlan.
Shouldn't be basing exports on kernel config options like this.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent e953c5c1
...@@ -295,6 +295,7 @@ int br_del_bridge(const char *name) ...@@ -295,6 +295,7 @@ int br_del_bridge(const char *name)
return ret; return ret;
} }
/* Mtu of the bridge pseudo-device 1500 or the minimum of the ports */
int br_min_mtu(const struct net_bridge *br) int br_min_mtu(const struct net_bridge *br)
{ {
const struct net_bridge_port *p; const struct net_bridge_port *p;
...@@ -347,7 +348,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) ...@@ -347,7 +348,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
br_stp_enable_port(p); br_stp_enable_port(p);
spin_unlock_bh(&br->lock); spin_unlock_bh(&br->lock);
br->dev->mtu = br_min_mtu(br); dev_set_mtu(br->dev, br_min_mtu(br));
} }
return err; return err;
......
...@@ -48,7 +48,7 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v ...@@ -48,7 +48,7 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
break; break;
case NETDEV_CHANGEMTU: case NETDEV_CHANGEMTU:
br->dev->mtu = br_min_mtu(br); dev_set_mtu(br->dev, br_min_mtu(br));
break; break;
case NETDEV_DOWN: case NETDEV_DOWN:
......
...@@ -3431,6 +3431,8 @@ EXPORT_SYMBOL(dev_queue_xmit_nit); ...@@ -3431,6 +3431,8 @@ EXPORT_SYMBOL(dev_queue_xmit_nit);
EXPORT_SYMBOL(dev_remove_pack); EXPORT_SYMBOL(dev_remove_pack);
EXPORT_SYMBOL(dev_set_allmulti); EXPORT_SYMBOL(dev_set_allmulti);
EXPORT_SYMBOL(dev_set_promiscuity); EXPORT_SYMBOL(dev_set_promiscuity);
EXPORT_SYMBOL(dev_change_flags);
EXPORT_SYMBOL(dev_set_mtu);
EXPORT_SYMBOL(free_netdev); EXPORT_SYMBOL(free_netdev);
EXPORT_SYMBOL(netdev_boot_setup_check); EXPORT_SYMBOL(netdev_boot_setup_check);
EXPORT_SYMBOL(netdev_set_master); EXPORT_SYMBOL(netdev_set_master);
...@@ -3448,10 +3450,7 @@ EXPORT_SYMBOL(unregister_netdevice_notifier); ...@@ -3448,10 +3450,7 @@ EXPORT_SYMBOL(unregister_netdevice_notifier);
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
EXPORT_SYMBOL(br_handle_frame_hook); EXPORT_SYMBOL(br_handle_frame_hook);
#endif #endif
/* for 801q VLAN support */
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
EXPORT_SYMBOL(dev_change_flags);
#endif
#ifdef CONFIG_KMOD #ifdef CONFIG_KMOD
EXPORT_SYMBOL(dev_load); EXPORT_SYMBOL(dev_load);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment