From eea2ef0754a7fd624c011a7c5df243250da57da0 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 29 May 2019 08:57:11 -0400 Subject: [PATCH] zebra: BGP always sends distance no need to double check BGP always sends down the correct distance to use. We do not need rib_add_multipath to double check the code. Signed-off-by: Donald Sharp --- zebra/zebra_rib.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index b31b6a1250..75a490c291 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2704,15 +2704,9 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p, apply_mask_ipv6(src_p); /* Set default distance by route type. */ - if (re->distance == 0) { + if (re->distance == 0) re->distance = route_distance(re->type); - /* iBGP distance is 200. */ - if (re->type == ZEBRA_ROUTE_BGP - && CHECK_FLAG(re->flags, ZEBRA_FLAG_IBGP)) - re->distance = 200; - } - /* Lookup route node.*/ rn = srcdest_rnode_get(table, p, src_p); -- 2.39.5