aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/iproute2.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 0df8eef7..906a45e0 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -160,7 +160,8 @@ _add_route()
# We cannot use a metric if we're using a nexthop
if ! ${have_metric} && \
- [ -n "${metric}" -a -z "${cmd##* nexthop }" ]
+ [ -n "${metric}" -a \
+ "${cmd##* nexthop }" = "$cmd" ]
then
cmd="${cmd} metric ${metric}"
fi