diff options
author | stephen hemminger <stephen@networkplumber.org> | 2013-04-13 16:06:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-15 20:03:44 +0200 |
commit | 8f3359bdc83f1abb1989e0817ab0e0b18667c828 (patch) | |
tree | 445804a55d594511f181fda573faecc78604509a /net/bridge/br_if.c | |
parent | ipv6: statically link register_inet6addr_notifier() (diff) | |
download | linux-8f3359bdc83f1abb1989e0817ab0e0b18667c828.tar.xz linux-8f3359bdc83f1abb1989e0817ab0e0b18667c828.zip |
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_if.c')
-rw-r--r-- | net/bridge/br_if.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index ef1b91431c6b..459dab22b3f6 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -67,7 +67,8 @@ void br_port_carrier_check(struct net_bridge_port *p) struct net_device *dev = p->dev; struct net_bridge *br = p->br; - if (netif_running(dev) && netif_oper_up(dev)) + if (!(p->flags & BR_ADMIN_COST) && + netif_running(dev) && netif_oper_up(dev)) p->path_cost = port_cost(dev); if (!netif_running(br->dev)) |