X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_entry_src_adj.c;h=2a5b46a2c918cad019aa296ce4fc4ea0e22222f4;hb=9efcee6e7babd49999af3e3dcd13ee33d0a4c02d;hp=e43e36ee4e5b78bb5a6776e7ee12a0e506b74faf;hpb=2303cb181b51f63c909cd506125c1f832432865a;p=vpp.git diff --git a/src/vnet/fib/fib_entry_src_adj.c b/src/vnet/fib/fib_entry_src_adj.c index e43e36ee4e5..2a5b46a2c91 100644 --- a/src/vnet/fib/fib_entry_src_adj.c +++ b/src/vnet/fib/fib_entry_src_adj.c @@ -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), @@ -290,11 +292,17 @@ fib_entry_src_adj_deactivate (fib_entry_src_t *src, fib_entry_t *cover; /* - * remove the depednecy on the covering entry + * remove the dependency on the covering entry */ - ASSERT(FIB_NODE_INDEX_INVALID != src->u.adj.fesa_cover); - cover = fib_entry_get(src->u.adj.fesa_cover); + if (FIB_NODE_INDEX_INVALID == src->u.adj.fesa_cover) + { + /* + * this is the case if the entry is in the non-forwarding trie + */ + return; + } + cover = fib_entry_get(src->u.adj.fesa_cover); fib_entry_cover_untrack(cover, src->u.adj.fesa_sibling); /* @@ -348,6 +356,7 @@ fib_entry_src_adj_cover_change (fib_entry_src_t *src, res.bw_reason = FIB_NODE_BW_REASON_FLAG_EVALUATE; } + FIB_ENTRY_DBG(fib_entry, "adj-src-cover-changed"); return (res); } @@ -360,21 +369,27 @@ fib_entry_src_adj_cover_update (fib_entry_src_t *src, { /* * the cover has updated, i.e. its forwarding or flags - * have changed. don't decativate/activate here, since this + * have changed. don't deactivate/activate here, since this * 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); + /* + * 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); - res.install = (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_i(cover)); + res.install = (FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags_i(cover)); + FIB_ENTRY_DBG(fib_entry, "adj-src-cover-updated"); + } return (res); }