diff options
Diffstat (limited to 'net/bridge/br_notify.c')
-rw-r--r-- | net/bridge/br_notify.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/bridge/br_notify.c b/net/bridge/br_notify.c index 37357ed2149b..c8451d3a070c 100644 --- a/net/bridge/br_notify.c +++ b/net/bridge/br_notify.c | |||
@@ -50,7 +50,6 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v | |||
50 | case NETDEV_CHANGEADDR: | 50 | case NETDEV_CHANGEADDR: |
51 | spin_lock_bh(&br->lock); | 51 | spin_lock_bh(&br->lock); |
52 | br_fdb_changeaddr(p, dev->dev_addr); | 52 | br_fdb_changeaddr(p, dev->dev_addr); |
53 | br_ifinfo_notify(RTM_NEWLINK, p); | ||
54 | br_stp_recalculate_bridge_id(br); | 53 | br_stp_recalculate_bridge_id(br); |
55 | spin_unlock_bh(&br->lock); | 54 | spin_unlock_bh(&br->lock); |
56 | break; | 55 | break; |
@@ -74,10 +73,11 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v | |||
74 | break; | 73 | break; |
75 | 74 | ||
76 | case NETDEV_UP: | 75 | case NETDEV_UP: |
77 | spin_lock_bh(&br->lock); | 76 | if (netif_carrier_ok(dev) && (br->dev->flags & IFF_UP)) { |
78 | if (netif_carrier_ok(dev) && (br->dev->flags & IFF_UP)) | 77 | spin_lock_bh(&br->lock); |
79 | br_stp_enable_port(p); | 78 | br_stp_enable_port(p); |
80 | spin_unlock_bh(&br->lock); | 79 | spin_unlock_bh(&br->lock); |
80 | } | ||
81 | break; | 81 | break; |
82 | 82 | ||
83 | case NETDEV_UNREGISTER: | 83 | case NETDEV_UNREGISTER: |
@@ -85,5 +85,10 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v | |||
85 | break; | 85 | break; |
86 | } | 86 | } |
87 | 87 | ||
88 | /* Events that may cause spanning tree to refresh */ | ||
89 | if (event == NETDEV_CHANGEADDR || event == NETDEV_UP || | ||
90 | event == NETDEV_CHANGE || event == NETDEV_DOWN) | ||
91 | br_ifinfo_notify(RTM_NEWLINK, p); | ||
92 | |||
88 | return NOTIFY_DONE; | 93 | return NOTIFY_DONE; |
89 | } | 94 | } |