diff options
author | Lu Feng <lu.feng@6wind.com> | 2014-04-14 08:09:29 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2014-06-03 15:32:11 +0200 |
commit | 7b3b98ae3ecdad20cf5cebd2a6532aee17184d95 (patch) | |
tree | e95cee3c81dec96641e6c7497f69faa3134a5085 /ripd/ripd.c | |
parent | 224e7e515747b74dd6d3610570a64b9726a27722 (diff) | |
download | quagga-7b3b98ae3ecdad20cf5cebd2a6532aee17184d95.tar.bz2 quagga-7b3b98ae3ecdad20cf5cebd2a6532aee17184d95.tar.xz |
ripd & ripngd: avoid the zero interface metric
The interface metric is initialized to 0 in the commit db19c85:
zebra: set metric for directly connected routes via netlink to 0
Ripd and ripngd must be aware of it and avoid increase the
route metric by 0.
Signed-off-by: Feng Lu <lu.feng@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r-- | ripd/ripd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c index 55a1a75f..01bd69ec 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -433,7 +433,7 @@ rip_rte_process (struct rte *rte, struct sockaddr_in *from, /* If offset-list does not modify the metric use interface's metric. */ if (!ret) - rte->metric += ifp->metric; + rte->metric += ifp->metric ? ifp->metric : 1; if (rte->metric > RIP_METRIC_INFINITY) rte->metric = RIP_METRIC_INFINITY; |