summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2013-10-15 14:57:45 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-04 04:23:40 -0800
commit0a8a2e325e1badbf4dd5243b9368838b0e9ad0e4 (patch)
tree9e44c26ca27ddffd0b0972712236f34cf5cbdd0c
parent25c065e6ed51e0fa5b1010c1682b3cad8fd34763 (diff)
downloadlwn-0a8a2e325e1badbf4dd5243b9368838b0e9ad0e4.tar.gz
lwn-0a8a2e325e1badbf4dd5243b9368838b0e9ad0e4.zip
bridge: Correctly clamp MAX forward_delay when enabling STP
[ Upstream commit 4b6c7879d84ad06a2ac5b964808ed599187a188d ] Commit be4f154d5ef0ca147ab6bcd38857a774133f5450 bridge: Clamp forward_delay when enabling STP had a typo when attempting to clamp maximum forward delay. It is possible to set bridge_forward_delay to be higher then permitted maximum when STP is off. When turning STP on, the higher then allowed delay has to be clamed down to max value. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> CC: Herbert Xu <herbert@gondor.apana.org.au> CC: Stephen Hemminger <shemminger@vyatta.com> Reviewed-by: Veaceslav Falico <vfalico@redhat.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/bridge/br_stp_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index f774796f7e57..2f100ccef86f 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -134,7 +134,7 @@ static void br_stp_start(struct net_bridge *br)
if (br->bridge_forward_delay < BR_MIN_FORWARD_DELAY)
__br_set_forward_delay(br, BR_MIN_FORWARD_DELAY);
- else if (br->bridge_forward_delay < BR_MAX_FORWARD_DELAY)
+ else if (br->bridge_forward_delay > BR_MAX_FORWARD_DELAY)
__br_set_forward_delay(br, BR_MAX_FORWARD_DELAY);
if (r == 0) {