diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2020-07-17 17:29:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-17 17:29:49 -0400 |
| commit | 55528234eae823d14b808527d90fa003cd424552 (patch) | |
| tree | 343529ff03c3862fbd8d04885a5027f1a47633ff /zebra/zebra_rib.c | |
| parent | a0f6893193b722171cb7758ef5c1743bed8696f7 (diff) | |
| parent | 43a9f66cd1d1b8a43fa47f25150865012061ac98 (diff) | |
Merge pull request #6753 from mjstapp/fix_zebra_backup_sa
zebra: fix SA warnings in backup nexthop code
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index ddf2766737..15c491ae72 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1936,7 +1936,7 @@ static int rib_count_installed_nh(struct route_entry *re) /* The meaningful flag depends on where the installed * nexthops reside. */ - if (nhg == &(re->fib_backup_ng)) { + if (nhg == &(re->fib_ng)) { if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)) count++; } else { @@ -1945,9 +1945,12 @@ static int rib_count_installed_nh(struct route_entry *re) } } - for (ALL_NEXTHOPS_PTR(rib_get_fib_backup_nhg(re), nexthop)) { - if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)) - count++; + nhg = rib_get_fib_backup_nhg(re); + if (nhg) { + for (ALL_NEXTHOPS_PTR(nhg, nexthop)) { + if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)) + count++; + } } return count; |
