mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-06 05:45:33 +00:00
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>
This commit is contained in:
parent
e4e451ce15
commit
844b3a8748
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user