diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2013-09-12 17:12:05 +1000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-12 23:32:14 -0400 |
commit | be4f154d5ef0ca147ab6bcd38857a774133f5450 (patch) | |
tree | a0d1f8c90c823bbecebaf30a02e2b5ad79c97944 /net/bridge/br_private.h | |
parent | 9a0620133ccce9dd35c00a96405c8d80938c2cc0 (diff) | |
download | linux-be4f154d5ef0ca147ab6bcd38857a774133f5450.tar.gz linux-be4f154d5ef0ca147ab6bcd38857a774133f5450.tar.bz2 linux-be4f154d5ef0ca147ab6bcd38857a774133f5450.zip |
bridge: Clamp forward_delay when enabling STP
At some point limits were added to forward_delay. However, the
limits are only enforced when STP is enabled. This created a
scenario where you could have a value outside the allowed range
while STP is disabled, which then stuck around even after STP
is enabled.
This patch fixes this by clamping the value when we enable STP.
I had to move the locking around a bit to ensure that there is
no window where someone could insert a value outside the range
while we're in the middle of enabling STP.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r-- | net/bridge/br_private.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 598cb0b333c6..cda83158a21c 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -746,6 +746,7 @@ extern struct net_bridge_port *br_get_port(struct net_bridge *br, extern void br_init_port(struct net_bridge_port *p); extern void br_become_designated_port(struct net_bridge_port *p); +extern void __br_set_forward_delay(struct net_bridge *br, unsigned long t); extern int br_set_forward_delay(struct net_bridge *br, unsigned long x); extern int br_set_hello_time(struct net_bridge *br, unsigned long x); extern int br_set_max_age(struct net_bridge *br, unsigned long x); |