aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat_types.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2020-09-11 17:30:06 +0200
committerDave Barach <openvpp@barachs.net>2020-09-25 19:55:39 +0000
commitce25b60de5536e2f79bb72e929e70ccc1a75e0f8 (patch)
treedb5b9b18b321bb1dec2f0742afffd647695d12ce /src/plugins/cnat/cnat_types.c
parent613b2c3c78fbec12cc87a0095ee5488252449698 (diff)
cnat: Introduce parametric source policy
Type: feature Change-Id: I60ae9dd1c100b587d1902a20596b99a5c8a95df7 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/cnat/cnat_types.c')
-rw-r--r--src/plugins/cnat/cnat_types.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/cnat/cnat_types.c b/src/plugins/cnat/cnat_types.c
index 9db953f0174..a66ebf647ea 100644
--- a/src/plugins/cnat/cnat_types.c
+++ b/src/plugins/cnat/cnat_types.c
@@ -82,12 +82,6 @@ cnat_types_init (vlib_main_t * vm)
clib_rwlock_init (&cnat_main.ts_lock);
- vec_validate (cnat_main.src_ports, CNAT_N_SPORT_PROTO);
- for (int i = 0; i < CNAT_N_SPORT_PROTO; i++)
- {
- clib_spinlock_init (&cnat_main.src_ports[i].lock);
- clib_bitmap_validate (cnat_main.src_ports[i].bmap, UINT16_MAX);
- }
throttle_init (&cnat_throttle, n_vlib_mains, 1e-3);
return (NULL);
@@ -165,6 +159,12 @@ cnat_config (vlib_main_t * vm, unformat_input_t * input)
return 0;
}
+cnat_main_t *
+cnat_get_main ()
+{
+ return &cnat_main;
+}
+
VLIB_EARLY_CONFIG_FUNCTION (cnat_config, "cnat");
VLIB_INIT_FUNCTION (cnat_types_init);