From: Stephen Worley Date: Thu, 30 Jan 2020 17:34:35 +0000 (-0500) Subject: zebra: set valid on re->nhe directly in nexthop_active_update() X-Git-Tag: base_7.4~163^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=715e5c70d564017a8b709599e23bf94884ab9bb9;p=mirror%2Ffrr.git zebra: set valid on re->nhe directly in nexthop_active_update() We were still doing a lookup on the nhe_id from before we started referencing re->nhe directly. Change set flag to just use re->nhe directly here since they should always be the same at this point in the code anyway. Signed-off-by: Stephen Worley --- diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 6a14e53b4b..6956d4d34e 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1811,19 +1811,8 @@ int nexthop_active_update(struct route_node *rn, struct route_entry *re) route_entry_update_nhe(re, new_nhe); } - if (curr_active) { - struct nhg_hash_entry *nhe = NULL; - - nhe = zebra_nhg_lookup_id(re->nhe_id); - - if (nhe) - SET_FLAG(nhe->flags, NEXTHOP_GROUP_VALID); - else - flog_err( - EC_ZEBRA_TABLE_LOOKUP_FAILED, - "Active update on NHE id=%u that we do not have in our tables", - re->nhe_id); - } + if (curr_active) + SET_FLAG(re->nhe->flags, NEXTHOP_GROUP_VALID); /* * Do not need these nexthops anymore since they