Commit 4ecb961c authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 56139fc5
......@@ -188,6 +188,8 @@ static int br_rtm_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
p->state = new_state;
br_log_state(p);
br_ifinfo_notify(RTM_NEWLINK, p);
return 0;
}
......
......@@ -363,6 +363,8 @@ static void br_make_blocking(struct net_bridge_port *p)
p->state = BR_STATE_BLOCKING;
br_log_state(p);
br_ifinfo_notify(RTM_NEWLINK, p);
del_timer(&p->forward_delay_timer);
}
}
......@@ -386,8 +388,8 @@ static void br_make_forwarding(struct net_bridge_port *p)
p->state = BR_STATE_LEARNING;
br_multicast_enable_port(p);
br_log_state(p);
br_ifinfo_notify(RTM_NEWLINK, p);
if (br->forward_delay != 0)
mod_timer(&p->forward_delay_timer, jiffies + br->forward_delay);
......
......@@ -88,6 +88,7 @@ void br_stp_enable_port(struct net_bridge_port *p)
br_init_port(p);
br_port_state_selection(p->br);
br_log_state(p);
br_ifinfo_notify(RTM_NEWLINK, p);
}
/* called under bridge lock */
......@@ -104,6 +105,8 @@ void br_stp_disable_port(struct net_bridge_port *p)
p->topology_change_ack = 0;
p->config_pending = 0;
br_ifinfo_notify(RTM_NEWLINK, p);
del_timer(&p->message_age_timer);
del_timer(&p->forward_delay_timer);
del_timer(&p->hold_timer);
......
......@@ -97,6 +97,7 @@ static void br_forward_delay_timer_expired(unsigned long arg)
netif_carrier_on(br->dev);
}
br_log_state(p);
br_ifinfo_notify(RTM_NEWLINK, p);
spin_unlock(&br->lock);
}
......
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