summaryrefslogtreecommitdiffstats
path: root/ripngd/ripngd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd/ripngd.c')
-rw-r--r--ripngd/ripngd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 8e97c2f8..318f600e 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -717,7 +717,7 @@ ripng_route_process (struct rte *rte, struct sockaddr_in6 *from,
/* If offset-list does not modify the metric use interface's
* one. */
if (! ret)
- rte->metric += ifp->metric;
+ rte->metric += ifp->metric ? ifp->metric : 1;
if (rte->metric > RIPNG_METRIC_INFINITY)
rte->metric = RIPNG_METRIC_INFINITY;