lcp_router_route_mk_prefix (rr, &pfx);
entry_flags = lcp_router_route_mk_entry_flags (rtype, table_id, rproto);
- nlt = lcp_router_table_add_or_lock (table_id, pfx.fp_proto);
/* Skip any kernel routes and IPv6 LL or multicast routes */
if (rproto == RTPROT_KERNEL ||
(FIB_PROTOCOL_IP6 == pfx.fp_proto &&
if (0 != vec_len (np.paths))
{
+ nlt = lcp_router_table_add_or_lock (table_id, pfx.fp_proto);
+
if (rtype == RTN_MULTICAST)
{
/* it's not clear to me how linux expresses the RPF paramters
LCP_ROUTER_DBG ("no paths for route: %d:%U %U",
rtnl_route_get_table (rr), format_fib_prefix, &pfx,
format_fib_entry_flags, entry_flags);
+
+ nlt =
+ lcp_router_table_find (lcp_router_table_k2f (table_id), pfx.fp_proto);
+
+ if (is_replace && nlt)
+ {
+ fib_source_t fib_src;
+ fib_src = lcp_router_proto_fib_source (rproto);
+ fib_table_entry_delete (nlt->nlt_fib_index, &pfx, fib_src);
+ }
}
vec_free (np.paths);
}