diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-09-20 19:04:26 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-09-21 13:27:50 -0300 |
| commit | 844b3a8748cce00fdcc913d7ff89f181b7fd9dd1 (patch) | |
| tree | a7f8499ab49b6c545a7a5b2448ea02373d9b3e5c | |
| parent | e4e451ce15d0970e41cb2c1b5ee65f16e3f64683 (diff) | |
zebra: fix detection of duplicate kernel routes (ECMP version)
Fixes the following bug:
% ip route add 50.0.0.0/8 nexthop via 10.0.1.2 nexthop via 10.0.2.2
% ip route replace 50.0.0.0/8 nexthop via 10.0.1.3 nexthop via 10.0.2.3
% ip route replace 50.0.0.0/8 nexthop via 10.0.1.4 nexthop via 10.0.2.4
%
% vtysh -c "show ip route"
[snip]
K * 50.0.0.0/8 [0/0] via 10.0.1.4, rt1-eth1, 00:00:00
* via 10.0.2.4, rt1-eth2, 00:00:00
K * 50.0.0.0/8 [0/0] via 10.0.1.3, rt1-eth1, 00:00:10
* via 10.0.2.3, rt1-eth2, 00:00:10
K>* 50.0.0.0/8 [0/0] via 10.0.1.2, rt1-eth1, 00:00:24
* via 10.0.2.2, rt1-eth2, 00:00:24
Commit a3d18ce6 fixed a similar problem for single-path routes.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| -rw-r--r-- | zebra/zebra_rib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index bc39ffeacf..13057e0ae4 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2260,7 +2260,11 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, if (same->type == ZEBRA_ROUTE_KERNEL && same->metric != re->metric) continue; - if (!RIB_SYSTEM_ROUTE(same)) + /* + * We should allow duplicate connected routes because of + * IPv6 link-local routes and unnumbered interfaces on Linux. + */ + if (same->type != ZEBRA_ROUTE_CONNECT) break; } |
