aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-07-22 03:47:09 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-22 20:01:12 -0400
commit4ecb961c8b474ebef5aff55f715c7875e69dd57b (patch)
tree32aff0d005ed0f5c810fc41a711e64ee6afae937 /net
parent56139fc5bd6e740706993ab3ad0d0aeff69a8479 (diff)
bridge: add notification over netlink when STP changes state
When STP changes state of interface need to send a new link message to reflect that change. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_netlink.c2
-rw-r--r--net/bridge/br_stp.c4
-rw-r--r--net/bridge/br_stp_if.c3
-rw-r--r--net/bridge/br_stp_timer.c1
4 files changed, 9 insertions, 1 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 6814083a92f4..5b1ed1ba9aa7 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -188,6 +188,8 @@ static int br_rtm_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
188 188
189 p->state = new_state; 189 p->state = new_state;
190 br_log_state(p); 190 br_log_state(p);
191 br_ifinfo_notify(RTM_NEWLINK, p);
192
191 return 0; 193 return 0;
192} 194}
193 195
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index fcff62251547..4d651af57a90 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -363,6 +363,8 @@ static void br_make_blocking(struct net_bridge_port *p)
363 363
364 p->state = BR_STATE_BLOCKING; 364 p->state = BR_STATE_BLOCKING;
365 br_log_state(p); 365 br_log_state(p);
366 br_ifinfo_notify(RTM_NEWLINK, p);
367
366 del_timer(&p->forward_delay_timer); 368 del_timer(&p->forward_delay_timer);
367 } 369 }
368} 370}
@@ -386,8 +388,8 @@ static void br_make_forwarding(struct net_bridge_port *p)
386 p->state = BR_STATE_LEARNING; 388 p->state = BR_STATE_LEARNING;
387 389
388 br_multicast_enable_port(p); 390 br_multicast_enable_port(p);
389
390 br_log_state(p); 391 br_log_state(p);
392 br_ifinfo_notify(RTM_NEWLINK, p);
391 393
392 if (br->forward_delay != 0) 394 if (br->forward_delay != 0)
393 mod_timer(&p->forward_delay_timer, jiffies + br->forward_delay); 395 mod_timer(&p->forward_delay_timer, jiffies + br->forward_delay);
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 6f615b8192f4..10eda3cd1d71 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -88,6 +88,7 @@ void br_stp_enable_port(struct net_bridge_port *p)
88 br_init_port(p); 88 br_init_port(p);
89 br_port_state_selection(p->br); 89 br_port_state_selection(p->br);
90 br_log_state(p); 90 br_log_state(p);
91 br_ifinfo_notify(RTM_NEWLINK, p);
91} 92}
92 93
93/* called under bridge lock */ 94/* called under bridge lock */
@@ -104,6 +105,8 @@ void br_stp_disable_port(struct net_bridge_port *p)
104 p->topology_change_ack = 0; 105 p->topology_change_ack = 0;
105 p->config_pending = 0; 106 p->config_pending = 0;
106 107
108 br_ifinfo_notify(RTM_NEWLINK, p);
109
107 del_timer(&p->message_age_timer); 110 del_timer(&p->message_age_timer);
108 del_timer(&p->forward_delay_timer); 111 del_timer(&p->forward_delay_timer);
109 del_timer(&p->hold_timer); 112 del_timer(&p->hold_timer);
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c
index 3e965140051e..58de2a0f9975 100644
--- a/net/bridge/br_stp_timer.c
+++ b/net/bridge/br_stp_timer.c
@@ -97,6 +97,7 @@ static void br_forward_delay_timer_expired(unsigned long arg)
97 netif_carrier_on(br->dev); 97 netif_carrier_on(br->dev);
98 } 98 }
99 br_log_state(p); 99 br_log_state(p);
100 br_ifinfo_notify(RTM_NEWLINK, p);
100 spin_unlock(&br->lock); 101 spin_unlock(&br->lock);
101} 102}
102 103