From 724583edaddffda86498967ba51297fa6adcb653 Mon Sep 17 00:00:00 2001 From: Stephen Worley Date: Fri, 4 Oct 2019 16:12:19 -0400 Subject: [PATCH] zebra: Set the nhe type in the appropriate place We were setting the nhe type on uninstall when it should be on the install. Signed-off-by: Stephen Worley --- zebra/zebra_nhg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 44524ec507..da6c2c26c6 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1786,6 +1786,9 @@ void zebra_nhg_install_kernel(struct nhg_hash_entry *nhe) if (!CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED) && !CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_QUEUED)) { + /* Change its type to us since we are installing it */ + nhe->type = ZEBRA_ROUTE_NHG; + int ret = dplane_nexthop_add(nhe); switch (ret) { @@ -1813,8 +1816,6 @@ void zebra_nhg_uninstall_kernel(struct nhg_hash_entry *nhe) if (CHECK_FLAG(nhe->flags, NEXTHOP_GROUP_INSTALLED)) { int ret = dplane_nexthop_delete(nhe); - /* Change its type to us since we are installing it */ - nhe->type = ZEBRA_ROUTE_NHG; switch (ret) { case ZEBRA_DPLANE_REQUEST_QUEUED: SET_FLAG(nhe->flags, NEXTHOP_GROUP_QUEUED); -- 2.39.5