diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_stp.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index 921bbe5cb94a..6e63ec3f1fcf 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c | |||
@@ -368,14 +368,25 @@ static void br_make_blocking(struct net_bridge_port *p) | |||
368 | /* called under bridge lock */ | 368 | /* called under bridge lock */ |
369 | static void br_make_forwarding(struct net_bridge_port *p) | 369 | static void br_make_forwarding(struct net_bridge_port *p) |
370 | { | 370 | { |
371 | if (p->state == BR_STATE_BLOCKING) { | 371 | struct net_bridge *br = p->br; |
372 | if (p->br->stp_enabled == BR_KERNEL_STP) | ||
373 | p->state = BR_STATE_LISTENING; | ||
374 | else | ||
375 | p->state = BR_STATE_LEARNING; | ||
376 | 372 | ||
377 | br_log_state(p); | 373 | if (p->state != BR_STATE_BLOCKING) |
378 | mod_timer(&p->forward_delay_timer, jiffies + p->br->forward_delay); } | 374 | return; |
375 | |||
376 | if (br->forward_delay == 0) { | ||
377 | p->state = BR_STATE_FORWARDING; | ||
378 | br_topology_change_detection(br); | ||
379 | del_timer(&p->forward_delay_timer); | ||
380 | } | ||
381 | else if (p->br->stp_enabled == BR_KERNEL_STP) | ||
382 | p->state = BR_STATE_LISTENING; | ||
383 | else | ||
384 | p->state = BR_STATE_LEARNING; | ||
385 | |||
386 | br_log_state(p); | ||
387 | |||
388 | if (br->forward_delay != 0) | ||
389 | mod_timer(&p->forward_delay_timer, jiffies + br->forward_delay); | ||
379 | } | 390 | } |
380 | 391 | ||
381 | /* called under bridge lock */ | 392 | /* called under bridge lock */ |