summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
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