fib: adj cover refinement check change
Usually the adj cover refinement check which ensures that for any
adj sourced prefix its cover is connected, is satified by the presence
of the interface source. The interface source has a high priority
hence during the adj refinement check get_flags() which uses the best
source, usually returns the flags for the interface source. However,
in the presence of higher priority sources that interpose get_flags does
not return connected and the check fails.
With this change add a specific check for the interface source if the
best is not connected.
Type: feature
Change-Id: Iabc3e29fe7c447fc3ef313e40b00d48fab09fba4
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vnet/fib/fib_entry_src_adj.c b/src/vnet/fib/fib_entry_src_adj.c
index 816a1f4..b7f5946 100644
--- a/src/vnet/fib/fib_entry_src_adj.c
+++ b/src/vnet/fib/fib_entry_src_adj.c
@@ -237,7 +237,9 @@
* ip route add 10.0.0.0/24 Eth0
* is attached. and we want adj-fibs to install on Eth0.
*/
- if (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_i(cover))
+ if (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_i(cover) ||
+ (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_for_source(src->u.adj.fesa_cover,
+ FIB_SOURCE_INTERFACE)))
{
fib_entry_src_path_list_walk_cxt_t ctx = {
.cover_itf = fib_entry_get_resolving_interface(src->u.adj.fesa_cover),