summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index de8af3c9df..d53b27a387 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -688,7 +688,7 @@ void rib_install_kernel(struct route_node *rn, struct route_entry *re,
/*
* Install the resolved nexthop object first.
*/
- zebra_nhg_install_kernel(re->nhe);
+ zebra_nhg_install_kernel(re->nhe, re->type);
/*
* If this is a replace to a new RE let the originator of the RE
@@ -4384,9 +4384,14 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
* Use a temporary nhe to convey info to the common/main api.
*/
zebra_nhe_init(&nhe, afi, (ng ? ng->nexthop : NULL));
- if (ng)
+ if (ng) {
nhe.nhg.nexthop = ng->nexthop;
- else if (re->nhe_id > 0)
+
+ if (re->type == ZEBRA_ROUTE_CONNECT ||
+ re->type == ZEBRA_ROUTE_LOCAL ||
+ re->type == ZEBRA_ROUTE_KERNEL)
+ SET_FLAG(nhe.flags, NEXTHOP_GROUP_INITIAL_DELAY_INSTALL);
+ } else if (re->nhe_id > 0)
nhe.id = re->nhe_id;
n = zebra_nhe_copy(&nhe, 0);