summaryrefslogtreecommitdiff
path: root/zebra/zebra_rnh.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rnh.c')
-rw-r--r--zebra/zebra_rnh.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index f42354b6e6..71ee8975b5 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -376,19 +376,28 @@ zebra_rnh_resolve_entry (vrf_id_t vrfid, int family, rnh_type_t type,
{
if (CHECK_FLAG (rib->status, RIB_ENTRY_REMOVED))
continue;
- if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED))
+ if (! CHECK_FLAG (rib->status, RIB_ENTRY_SELECTED_FIB))
+ continue;
+
+ if (CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED))
{
- if (CHECK_FLAG(rnh->flags, ZEBRA_NHT_CONNECTED))
+ if (rib->type == ZEBRA_ROUTE_CONNECT)
+ break;
+ if (rib->type == ZEBRA_ROUTE_NHRP)
{
- if (rib->type == ZEBRA_ROUTE_CONNECT)
+ struct nexthop *nexthop;
+ for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next)
+ if (nexthop->type == NEXTHOP_TYPE_IFINDEX)
+ break;
+ if (nexthop)
break;
}
- else if ((type == RNH_IMPORT_CHECK_TYPE) &&
- (rib->type == ZEBRA_ROUTE_BGP))
- continue;
- else
- break;
}
+ else if ((type == RNH_IMPORT_CHECK_TYPE) &&
+ (rib->type == ZEBRA_ROUTE_BGP))
+ continue;
+ else
+ break;
}
}