summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rnh.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-07-27 17:49:36 +0200
committerGitHub <noreply@github.com>2020-07-27 17:49:36 +0200
commit790953a387b9940bda117702390d79b8c58d12fd (patch)
treed606d69effeed3e47575340383aad078444f5130 /zebra/zebra_rnh.c
parentMerge pull request #6803 from donaldsharp/coverity_moo_moo (diff)
parentzebra: add validate function for zapi_labels message (diff)
downloadfrr-790953a387b9940bda117702390d79b8c58d12fd.tar.xz
frr-790953a387b9940bda117702390d79b8c58d12fd.zip
Merge pull request #6765 from mjstapp/backup_nhg_netlink
lib,zebra: support multiple backup nexthops
Diffstat (limited to 'zebra/zebra_rnh.c')
-rw-r--r--zebra/zebra_rnh.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index b8b245ceb..b151e90a9 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -1040,22 +1040,10 @@ static bool compare_valid_nexthops(struct route_entry *r1,
* backups will be in the 'fib' list.
*/
nhg1 = rib_get_fib_backup_nhg(r1);
- if (nhg1 == zebra_nhg_get_backup_nhg(r1->nhe))
- nhg1 = NULL;
-
nhg2 = rib_get_fib_backup_nhg(r2);
- if (nhg2 == zebra_nhg_get_backup_nhg(r2->nhe))
- nhg2 = NULL;
-
- if (nhg1)
- nh1 = nhg1->nexthop;
- else
- nh1 = NULL;
- if (nhg2)
- nh2 = nhg2->nexthop;
- else
- nh2 = NULL;
+ nh1 = nhg1->nexthop;
+ nh2 = nhg2->nexthop;
while (1) {
/* Find each backup list's next valid nexthop */
@@ -1180,9 +1168,6 @@ static int send_client(struct rnh *rnh, struct zserv *client,
}
nhg = rib_get_fib_backup_nhg(re);
- if (nhg == zebra_nhg_get_backup_nhg(re->nhe))
- nhg = NULL;
-
if (nhg) {
for (ALL_NEXTHOPS_PTR(nhg, nh))
if (rnh_nexthop_valid(re, nh)) {