Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <net/sock.h>
|
||||
|
||||
#include "br_private.h"
|
||||
#include "br_private_stp.h"
|
||||
|
||||
static inline size_t br_nlmsg_size(void)
|
||||
{
|
||||
@@ -188,6 +189,11 @@ static int br_rtm_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
|
||||
|
||||
p->state = new_state;
|
||||
br_log_state(p);
|
||||
|
||||
spin_lock_bh(&p->br->lock);
|
||||
br_port_state_selection(p->br);
|
||||
spin_unlock_bh(&p->br->lock);
|
||||
|
||||
br_ifinfo_notify(RTM_NEWLINK, p);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -399,25 +399,24 @@ void br_port_state_selection(struct net_bridge *br)
|
||||
struct net_bridge_port *p;
|
||||
unsigned int liveports = 0;
|
||||
|
||||
/* Don't change port states if userspace is handling STP */
|
||||
if (br->stp_enabled == BR_USER_STP)
|
||||
return;
|
||||
|
||||
list_for_each_entry(p, &br->port_list, list) {
|
||||
if (p->state == BR_STATE_DISABLED)
|
||||
continue;
|
||||
|
||||
if (p->port_no == br->root_port) {
|
||||
p->config_pending = 0;
|
||||
p->topology_change_ack = 0;
|
||||
br_make_forwarding(p);
|
||||
} else if (br_is_designated_port(p)) {
|
||||
del_timer(&p->message_age_timer);
|
||||
br_make_forwarding(p);
|
||||
} else {
|
||||
p->config_pending = 0;
|
||||
p->topology_change_ack = 0;
|
||||
br_make_blocking(p);
|
||||
/* Don't change port states if userspace is handling STP */
|
||||
if (br->stp_enabled != BR_USER_STP) {
|
||||
if (p->port_no == br->root_port) {
|
||||
p->config_pending = 0;
|
||||
p->topology_change_ack = 0;
|
||||
br_make_forwarding(p);
|
||||
} else if (br_is_designated_port(p)) {
|
||||
del_timer(&p->message_age_timer);
|
||||
br_make_forwarding(p);
|
||||
} else {
|
||||
p->config_pending = 0;
|
||||
p->topology_change_ack = 0;
|
||||
br_make_blocking(p);
|
||||
}
|
||||
}
|
||||
|
||||
if (p->state == BR_STATE_FORWARDING)
|
||||
|
||||
Reference in New Issue
Block a user