From 4468119bd22a69d7ca5d91b9dcd14e7fdf6d136f Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 17:47:23 -0700 Subject: [PATCH] iBGP multipath is broken if 'bgp deterministic-med' is enabled --- bgpd/bgp_aspath.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c index 4406c8b23a..996101a279 100644 --- a/bgpd/bgp_aspath.c +++ b/bgpd/bgp_aspath.c @@ -1417,6 +1417,10 @@ aspath_cmp_left (const struct aspath *aspath1, const struct aspath *aspath2) if (!(aspath1 && aspath2)) return 0; + /* If both paths are originated in this AS then we do want to compare MED */ + if (!aspath_count_hops(aspath1) && !aspath_count_hops(aspath2)) + return 1; + seg1 = aspath1->segments; seg2 = aspath2->segments; -- 2.39.5