fib: adj cover refinement check change 22/20322/2
authorNeale Ranns <nranns@cisco.com>
Tue, 25 Jun 2019 11:38:37 +0000 (11:38 +0000)
committerNeale Ranns <nranns@cisco.com>
Wed, 26 Jun 2019 07:29:04 +0000 (07:29 +0000)
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>
src/vnet/fib/fib_entry_src_adj.c

index 816a1f4..b7f5946 100644 (file)
@@ -237,7 +237,9 @@ fib_entry_src_adj_activate (fib_entry_src_t *src,
      *   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),