diff options
author | stephen hemminger <stephen@networkplumber.org> | 2013-04-13 14:06:07 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-15 14:03:44 -0400 |
commit | 8f3359bdc83f1abb1989e0817ab0e0b18667c828 (patch) | |
tree | 445804a55d594511f181fda573faecc78604509a /net/bridge/br_stp_if.c | |
parent | f88c91ddba958e9a5dd4a5ee8c52a0faa790f586 (diff) | |
download | op-kernel-dev-8f3359bdc83f1abb1989e0817ab0e0b18667c828.zip op-kernel-dev-8f3359bdc83f1abb1989e0817ab0e0b18667c828.tar.gz |
bridge: make user modified path cost sticky
Keep a STP port path cost value if it was set by a user.
Don't replace it with the link-speed based path cost
whenever the link goes down and comes back up.
Reported-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_if.c')
-rw-r--r-- | net/bridge/br_stp_if.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 0bdb4eb..d45e760 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -288,6 +288,7 @@ int br_stp_set_path_cost(struct net_bridge_port *p, unsigned long path_cost) path_cost > BR_MAX_PATH_COST) return -ERANGE; + p->flags |= BR_ADMIN_COST; p->path_cost = path_cost; br_configuration_update(p->br); br_port_state_selection(p->br); |