diff options
author | Roy Marples <roy@marples.name> | 2009-06-01 20:06:56 +0100 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-06-01 20:06:56 +0100 |
commit | efec0b5012efd7af5a882348c62e28f3e62c58fc (patch) | |
tree | d946c71f2d997d86b2fe45850150b617feec9aa8 /net | |
parent | 278e65b24a7cbb2a61c1d4e562e78d17d13bb8d3 (diff) |
nexthop routes don't use metrics
Diffstat (limited to 'net')
-rw-r--r-- | net/iproute2.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh index 44cdb296..08a42664 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -157,7 +157,10 @@ _add_route() shift done - if ! ${have_metric} && [ -n "${metric}" ]; then + # We cannot use a metric if we're using a nexthop + if ! ${have_metric} && \ + [ -n "${metric}" -a -z "${cmd##* nexthop }" ] + then cmd="${cmd} metric ${metric}" fi |