aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat66.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-12-04 06:11:00 +0000
committerOle Trøan <otroan@employees.org>2019-12-04 22:47:12 +0000
commit3bab8f9c5396a7bf1115b93a9e0691a76a9ed14c (patch)
tree0212708b47f042ac393848e0471669f837788278 /src/plugins/nat/nat66.c
parent5f8f6173328f8d77feea5fd100e150c3094c11f0 (diff)
fib: Decouple source from priority and behaviour
Type: feature the fib_source_t enum alone no longer defines the priority and behaviour, instead each source must be allocated these attributes. This allows the creation of other sources by the plugins (and soon over the API). Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I890ee820fbc16079ee417ea1fbc163192806e853
Diffstat (limited to 'src/plugins/nat/nat66.c')
-rw-r--r--src/plugins/nat/nat66.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/nat/nat66.c b/src/plugins/nat/nat66.c
index 2caefab6480..e5e783b31f7 100644
--- a/src/plugins/nat/nat66.c
+++ b/src/plugins/nat/nat66.c
@@ -170,7 +170,7 @@ nat66_static_mapping_add_del (ip6_address_t * l_addr, ip6_address_t * e_addr,
return VNET_API_ERROR_VALUE_EXIST;
fib_index = fib_table_find_or_create_and_lock (FIB_PROTOCOL_IP6, vrf_id,
- FIB_SOURCE_PLUGIN_HI);
+ nat_fib_src_hi);
pool_get (nm->sm, sm);
clib_memset (sm, 0, sizeof (*sm));
sm->l_addr.as_u64[0] = l_addr->as_u64[0];
@@ -214,8 +214,7 @@ nat66_static_mapping_add_del (ip6_address_t * l_addr, ip6_address_t * e_addr,
kv.key[2] = sm_key.as_u64[2];
if (clib_bihash_add_del_24_8 (&nm->sm_e, &kv, 0))
nat_elog_warn ("nat66-static-map-by-external delete key failed");
- fib_table_unlock (sm->fib_index, FIB_PROTOCOL_IP6,
- FIB_SOURCE_PLUGIN_HI);
+ fib_table_unlock (sm->fib_index, FIB_PROTOCOL_IP6, nat_fib_src_hi);
pool_put (nm->sm, sm);
}