"LISP-src for [%d,%U]",
dst_fib_index,
format_fib_prefix, &dst_fib_prefix);
-
+ /*
+ * add src fib default route
+ */
+ fib_prefix_t prefix = {
+ .fp_proto = dst_fib_prefix.fp_proto,
+ };
+ fib_table_entry_special_dpo_add (src_fib_index, &prefix,
+ FIB_SOURCE_LISP,
+ FIB_ENTRY_FLAG_EXCLUSIVE,
+ lisp_cp_dpo_get (fib_proto_to_dpo
+ (dst_fib_prefix.fp_proto)));
/*
* create a data-path object to perform the source address lookup
* in the SRC FIB
}
}
-static void
-ip_address_to_46 (const ip_address_t * addr,
- ip46_address_t * a, fib_protocol_t * proto)
-{
- *proto = (IP4 == ip_addr_version (addr) ?
- FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6);
- switch (*proto)
- {
- case FIB_PROTOCOL_IP4:
- a->ip4 = addr->ip.v4;
- break;
- case FIB_PROTOCOL_IP6:
- a->ip6 = addr->ip.v6;
- break;
- default:
- ASSERT (0);
- break;
- }
-}
-
static fib_route_path_t *
lisp_gpe_mk_fib_paths (const lisp_fwd_path_t * paths)
{
lisp_gpe_fwd_entry_mk_paths (lisp_gpe_fwd_entry_t * lfe,
vnet_lisp_gpe_add_del_fwd_entry_args_t * a)
{
- const lisp_gpe_tenant_t *lt;
lisp_fwd_path_t *path;
u32 index;
- lt = lisp_gpe_tenant_get (lfe->tenant);
vec_validate (lfe->paths, vec_len (a->locator_pairs) - 1);
vec_foreach_index (index, a->locator_pairs)
path->lisp_adj =
lisp_gpe_adjacency_find_or_create_and_lock (&a->locator_pairs
[index],
- lt->lt_table_id,
- lfe->key->vni);
+ a->dp_table, lfe->key->vni);
}
vec_sort_with_function (lfe->paths, lisp_gpe_fwd_entry_path_sort);
}
if (rv == 0)
return value.value;
}
+ else
+ return value.value;
return lisp_gpe_main.l2_lb_cp_lkup.dpoi_index;
}
{
lisp_fwd_path_t *path;
- vec_foreach (path, lfe->paths)
- {
- lisp_gpe_adjacency_unlock (path->lisp_adj);
- }
+ if (LISP_GPE_FWD_ENTRY_TYPE_NEGATIVE != lfe->type)
+ {
+ vec_foreach (path, lfe->paths)
+ {
+ lisp_gpe_adjacency_unlock (path->lisp_adj);
+ }
+ fib_path_list_child_remove (lfe->l2.path_list_index,
+ lfe->l2.child_index);
+ }
lisp_l2_fib_add_del_entry (lfe->l2.eid_bd_index,
fid_addr_mac (&lfe->key->lcl),
fid_addr_mac (&lfe->key->rmt), NULL, 0);
- fib_path_list_child_remove (lfe->l2.path_list_index, lfe->l2.child_index);
-
hash_unset_mem (lgm->lisp_gpe_fwd_entries, lfe->key);
clib_mem_free (lfe->key);
pool_put (lgm->lisp_fwd_entry_pool, lfe);
lfe = find_fwd_entry (lgm, a, &key);
- if (NULL != lfe)
+ if (NULL == lfe)
return VNET_API_ERROR_INVALID_VALUE;
del_l2_fwd_entry_i (lgm, lfe);
{
lisp_fwd_path_t *lfp = va_arg (ap, lisp_fwd_path_t *);
- s = format (s, "pirority:%d weight:%d ", lfp->priority, lfp->weight);
+ s = format (s, "priority:%d weight:%d ", lfp->priority, lfp->weight);
s = format (s, "adj:[%U]\n",
format_lisp_gpe_adjacency,
lisp_gpe_adjacency_get (lfp->lisp_adj),