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.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 67b3812ed3..15c491ae72 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1081,8 +1081,7 @@ static void rib_process(struct route_node *rn)
if (re != old_selected) {
if (IS_ZEBRA_DEBUG_RIB)
zlog_debug(
- "%s: %s(%u):%s: imported via import-table but denied "
- "by the ip protocol table route-map",
+ "%s: %s(%u):%s: imported via import-table but denied by the ip protocol table route-map",
__func__,
VRF_LOGNAME(vrf),
vrf_id, buf);
@@ -1937,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 {
@@ -1946,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;
@@ -3149,8 +3151,7 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
if (nh)
rnode_debug(
rn, vrf_id,
- "via %s ifindex %d type %d "
- "doesn't exist in rib",
+ "via %s ifindex %d type %d doesn't exist in rib",
inet_ntop(afi2family(afi),
&nh->gate, buf2,
sizeof(buf2)),