summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-06-01 20:06:56 +0100
committerRoy Marples <roy@marples.name>2009-06-01 20:06:56 +0100
commitefec0b5012efd7af5a882348c62e28f3e62c58fc (patch)
treed946c71f2d997d86b2fe45850150b617feec9aa8 /net
parent278e65b24a7cbb2a61c1d4e562e78d17d13bb8d3 (diff)
downloadopenrc-efec0b5012efd7af5a882348c62e28f3e62c58fc.tar.gz
openrc-efec0b5012efd7af5a882348c62e28f3e62c58fc.tar.bz2
openrc-efec0b5012efd7af5a882348c62e28f3e62c58fc.tar.xz
nexthop routes don't use metrics
Diffstat (limited to 'net')
-rw-r--r--net/iproute2.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 44cdb29..08a4266 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