summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry_src_interface.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-12-16 00:53:11 +0000
committerNeale Ranns <nranns@cisco.com>2019-12-17 00:17:19 +0000
commit3fd99047439fe56dcd070e6dcaea7bc14715749c (patch)
tree36bbbf2fadfc2e6acec8d9672269778b352e4543 /src/vnet/fib/fib_entry_src_interface.c
parente7ee300923d23b6a6eab42676c8dcce85da89bed (diff)
fib: Glean on NBMA interface points to drop
Type: fix Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Iaae7a9e120bbf8168c581b06d3ac0e124b32e0e7
Diffstat (limited to 'src/vnet/fib/fib_entry_src_interface.c')
-rw-r--r--src/vnet/fib/fib_entry_src_interface.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/vnet/fib/fib_entry_src_interface.c b/src/vnet/fib/fib_entry_src_interface.c
index 140036012b9..88154ef90be 100644
--- a/src/vnet/fib/fib_entry_src_interface.c
+++ b/src/vnet/fib/fib_entry_src_interface.c
@@ -66,17 +66,22 @@ fib_entry_src_interface_path_swap (fib_entry_src_t *src,
*/
if (!(FIB_ENTRY_FLAG_LOCAL & src->fes_entry_flags))
{
- adj = adj_get(fib_path_list_get_adj(
- src->fes_pl,
- fib_entry_get_default_chain_type(entry)));
+ adj_index_t ai;
- if (IP_LOOKUP_NEXT_GLEAN == adj->lookup_next_index)
+ ai = fib_path_list_get_adj(src->fes_pl,
+ fib_entry_get_default_chain_type(entry));
+ if (INDEX_INVALID != ai)
{
- /*
- * the connected prefix will link to a glean on a non-p2p
- * u.interface.
- */
- adj->sub_type.glean.receive_addr = entry->fe_prefix.fp_addr;
+ adj = adj_get(ai);
+
+ if (IP_LOOKUP_NEXT_GLEAN == adj->lookup_next_index)
+ {
+ /*
+ * the connected prefix will link to a glean on a non-p2p
+ * u.interface.
+ */
+ adj->sub_type.glean.receive_addr = entry->fe_prefix.fp_addr;
+ }
}
}
}