summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-11-26 19:30:08 +0000
committerDamjan Marion <dmarion@me.com>2019-11-26 23:19:32 +0000
commit9efcee6e7babd49999af3e3dcd13ee33d0a4c02d (patch)
treef4efec603f8883044923127ecfbfe0d2c687b523 /src/vnet
parentacaa04a22dd8bade2eca944ddd8517961433a34f (diff)
fib: Fix crash on cover update to non activated adj source
if the adj source is not active then there is no existing cover during a cover update Type: fix Ticket: VPP-1803 Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ie912f1c99345de4fb012bdcd97b443098d4a7351
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/fib/fib_entry_src_adj.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/vnet/fib/fib_entry_src_adj.c b/src/vnet/fib/fib_entry_src_adj.c
index b7f594656aa..2a5b46a2c91 100644
--- a/src/vnet/fib/fib_entry_src_adj.c
+++ b/src/vnet/fib/fib_entry_src_adj.c
@@ -373,19 +373,23 @@ fib_entry_src_adj_cover_update (fib_entry_src_t *src,
* prefix is updated during the covers walk.
*/
fib_entry_src_cover_res_t res = {
- .install = !0,
+ .install = 0,
.bw_reason = FIB_NODE_BW_REASON_FLAG_NONE,
};
fib_entry_t *cover;
- ASSERT(FIB_NODE_INDEX_INVALID != src->u.adj.fesa_cover);
-
- cover = fib_entry_get(src->u.adj.fesa_cover);
-
- res.install = (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_i(cover));
+ /*
+ * If there is no cover, then the source is not active and we can ignore
+ * this update
+ */
+ if (FIB_NODE_INDEX_INVALID != src->u.adj.fesa_cover)
+ {
+ cover = fib_entry_get(src->u.adj.fesa_cover);
- FIB_ENTRY_DBG(fib_entry, "adj-src-cover-updated");
+ res.install = (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_i(cover));
+ FIB_ENTRY_DBG(fib_entry, "adj-src-cover-updated");
+ }
return (res);
}