fib: Decouple source from priority and behaviour
[vpp.git] / src / plugins / nat / nat64_cli.c
index efeaa0b..be468df 100644 (file)
@@ -73,7 +73,7 @@ nat64_add_del_pool_addr_command_fn (vlib_main_t * vm,
 
   for (i = 0; i < count; i++)
     {
-      rv = nat64_add_del_pool_addr (&this_addr, vrf_id, is_add);
+      rv = nat64_add_del_pool_addr (0, &this_addr, vrf_id, is_add);
 
       switch (rv)
        {
@@ -358,7 +358,8 @@ nat64_add_del_static_bib_command_fn (vlib_main_t *
       goto done;
     case VNET_API_ERROR_INVALID_VALUE:
       error =
-       clib_error_return (0, "Outside addres %U and port %u already in use.",
+       clib_error_return (0,
+                          "Outside address %U and port %u already in use.",
                           format_ip4_address, &out_addr, out_port);
       goto done;
     case VNET_API_ERROR_INVALID_VALUE_2:
@@ -632,9 +633,9 @@ nat64_add_del_prefix_command_fn (vlib_main_t * vm, unformat_input_t * input,
        {
          fib_index =
            fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP6,
-                                              vrf_id, FIB_SOURCE_PLUGIN_HI);
+                                              vrf_id, nat_fib_src_hi);
          fib_table_entry_update_one_path (fib_index, &fibpfx,
-                                          FIB_SOURCE_PLUGIN_HI,
+                                          nat_fib_src_hi,
                                           FIB_ENTRY_FLAG_NONE,
                                           DPO_PROTO_IP6, NULL,
                                           sw_if_index, ~0, 0,
@@ -644,12 +645,11 @@ nat64_add_del_prefix_command_fn (vlib_main_t * vm, unformat_input_t * input,
        {
          fib_index = fib_table_find (FIB_PROTOCOL_IP6, vrf_id);
          fib_table_entry_path_remove (fib_index, &fibpfx,
-                                      FIB_SOURCE_PLUGIN_HI,
+                                      nat_fib_src_hi,
                                       DPO_PROTO_IP6, NULL,
                                       sw_if_index, ~0, 1,
                                       FIB_ROUTE_PATH_INTF_RX);
-         fib_table_unlock (fib_index, FIB_PROTOCOL_IP6,
-                           FIB_SOURCE_PLUGIN_HI);
+         fib_table_unlock (fib_index, FIB_PROTOCOL_IP6, nat_fib_src_hi);
        }
     }