FIB: store the node type not the function pointer.
[vpp.git] / src / vnet / vxlan / vxlan.c
index 61cb13c..a6e799f 100644 (file)
@@ -138,9 +138,7 @@ vxlan_tunnel_restack_dpo(vxlan_tunnel_t * t)
 static vxlan_tunnel_t *
 vxlan_tunnel_from_fib_node (fib_node_t *node)
 {
-#if (CLIB_DEBUG > 0)
     ASSERT(FIB_NODE_TYPE_VXLAN_TUNNEL == node->fn_type);
-#endif
     return ((vxlan_tunnel_t*) (((char*)node) -
                               STRUCT_OFFSET_OF(vxlan_tunnel_t, node)));
 }
@@ -486,7 +484,7 @@ int vnet_vxlan_add_del_tunnel
           vtep_addr_ref(&t->src);
           t->fib_entry_index = fib_table_entry_special_add
             (t->encap_fib_index, &tun_dst_pfx, FIB_SOURCE_RR,
-            FIB_ENTRY_FLAG_NONE, ADJ_INDEX_INVALID);
+            FIB_ENTRY_FLAG_NONE);
           t->sibling_index = fib_entry_child_add
             (t->fib_entry_index, FIB_NODE_TYPE_VXLAN_TUNNEL, t - vxm->tunnels);
           vxlan_tunnel_restack_dpo(t);
@@ -505,7 +503,7 @@ int vnet_vxlan_add_del_tunnel
               fib_node_index_t mfei;
               adj_index_t ai;
               fib_route_path_t path = {
-                  .frp_proto = fp,
+                  .frp_proto = fib_proto_to_dpo(fp),
                   .frp_addr = zero_addr,
                   .frp_sw_if_index = 0xffffffff,
                   .frp_fib_index = ~0,