History

Revert "bridge: Allow forward delay to be cfgd when STP enabled"

This reverts commit 34c2d9fb0498c066afbe610b15e18995fd8be792. There are 2 reasons for this revert: 1) The commit in question doesn't do what it says it does. The description reads: "Allow bridge forward delay to be configured when Spanning Tree is enabled." This was already the case before the commit was made. What the commit actually do was disallow invalid values or 'forward_delay' when STP was turned off. 2) The above change was actually a change in the user observed behavior and broke things like libvirt and other network configs that set 'forward_delay' to 0 without enabling STP. The value of 0 is actually used when STP is turned off to immediately mark the bridge as forwarding.

Vlad Yasevich committed 11 years ago

Commit 8a921261 parent a31d82d1 file · +9 −4Browse files

Unified · Split

net/bridge/br_stp.c+9−4
@@ -600,12 +600,17 @@ void __br_set_forward_delay(struct net_bridge *br, unsigned long t) · 599 unmodified lines
600600 int br_set_forward_delay(struct net_bridge *br, unsigned long val)
601601 {
602602 unsigned long t = clock_t_to_jiffies(val);
603−
604− if (t < BR_MIN_FORWARD_DELAY || t > BR_MAX_FORWARD_DELAY)
605− return -ERANGE;
603+ int err = -ERANGE;
606604
607605 spin_lock_bh(&br->lock);
606+ if (br->stp_enabled != BR_NO_STP &&
607+ (t < BR_MIN_FORWARD_DELAY || t > BR_MAX_FORWARD_DELAY))
608+ goto unlock;
609+
608610 __br_set_forward_delay(br, t);
611+ err = 0;
612+
613+unlock:
609614 spin_unlock_bh(&br->lock);
610− return 0;
615+ return err;
611616 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t