diff options
Diffstat (limited to 'net/bridge/br_stp_if.c')
-rw-r--r-- | net/bridge/br_stp_if.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index d45e760141bb..108084a04671 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c | |||
@@ -129,6 +129,14 @@ static void br_stp_start(struct net_bridge *br) | |||
129 | char *envp[] = { NULL }; | 129 | char *envp[] = { NULL }; |
130 | 130 | ||
131 | r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC); | 131 | r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC); |
132 | |||
133 | spin_lock_bh(&br->lock); | ||
134 | |||
135 | if (br->bridge_forward_delay < BR_MIN_FORWARD_DELAY) | ||
136 | __br_set_forward_delay(br, BR_MIN_FORWARD_DELAY); | ||
137 | else if (br->bridge_forward_delay < BR_MAX_FORWARD_DELAY) | ||
138 | __br_set_forward_delay(br, BR_MAX_FORWARD_DELAY); | ||
139 | |||
132 | if (r == 0) { | 140 | if (r == 0) { |
133 | br->stp_enabled = BR_USER_STP; | 141 | br->stp_enabled = BR_USER_STP; |
134 | br_debug(br, "userspace STP started\n"); | 142 | br_debug(br, "userspace STP started\n"); |
@@ -137,10 +145,10 @@ static void br_stp_start(struct net_bridge *br) | |||
137 | br_debug(br, "using kernel STP\n"); | 145 | br_debug(br, "using kernel STP\n"); |
138 | 146 | ||
139 | /* To start timers on any ports left in blocking */ | 147 | /* To start timers on any ports left in blocking */ |
140 | spin_lock_bh(&br->lock); | ||
141 | br_port_state_selection(br); | 148 | br_port_state_selection(br); |
142 | spin_unlock_bh(&br->lock); | ||
143 | } | 149 | } |
150 | |||
151 | spin_unlock_bh(&br->lock); | ||
144 | } | 152 | } |
145 | 153 | ||
146 | static void br_stp_stop(struct net_bridge *br) | 154 | static void br_stp_stop(struct net_bridge *br) |