diff options
Diffstat (limited to 'net/bridge/br_stp.c')
-rw-r--r-- | net/bridge/br_stp.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index f9ff4d57b0d7..ebb0861e9bd5 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c | |||
@@ -370,11 +370,11 @@ static void br_make_blocking(struct net_bridge_port *p) | |||
370 | static void br_make_forwarding(struct net_bridge_port *p) | 370 | static void br_make_forwarding(struct net_bridge_port *p) |
371 | { | 371 | { |
372 | if (p->state == BR_STATE_BLOCKING) { | 372 | if (p->state == BR_STATE_BLOCKING) { |
373 | if (p->br->stp_enabled) { | 373 | if (p->br->stp_enabled == BR_KERNEL_STP) |
374 | p->state = BR_STATE_LISTENING; | 374 | p->state = BR_STATE_LISTENING; |
375 | } else { | 375 | else |
376 | p->state = BR_STATE_LEARNING; | 376 | p->state = BR_STATE_LEARNING; |
377 | } | 377 | |
378 | br_log_state(p); | 378 | br_log_state(p); |
379 | mod_timer(&p->forward_delay_timer, jiffies + p->br->forward_delay); } | 379 | mod_timer(&p->forward_delay_timer, jiffies + p->br->forward_delay); } |
380 | } | 380 | } |
@@ -384,6 +384,10 @@ void br_port_state_selection(struct net_bridge *br) | |||
384 | { | 384 | { |
385 | struct net_bridge_port *p; | 385 | struct net_bridge_port *p; |
386 | 386 | ||
387 | /* Don't change port states if userspace is handling STP */ | ||
388 | if (br->stp_enabled == BR_USER_STP) | ||
389 | return; | ||
390 | |||
387 | list_for_each_entry(p, &br->port_list, list) { | 391 | list_for_each_entry(p, &br->port_list, list) { |
388 | if (p->state != BR_STATE_DISABLED) { | 392 | if (p->state != BR_STATE_DISABLED) { |
389 | if (p->port_no == br->root_port) { | 393 | if (p->port_no == br->root_port) { |