From efec0b5012efd7af5a882348c62e28f3e62c58fc Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 1 Jun 2009 20:06:56 +0100 Subject: nexthop routes don't use metrics --- net/iproute2.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net') 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 -- cgit v1.2.3