From 208891c093468b753830d1e7ebdb4a69d4c192bf Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Mon, 16 Nov 2020 18:57:52 +0100 Subject: cnat: Fix throttle hash & cleanup Type: fix This fixes two issues : - We used a hash to throttle RPC for adding fib entries, but as we rely on a refcount, we cannot accept loosing an entry, which could happen in case of a collision. - On client cleanup we weren't freeing the fib entry correctly which resulted in crashes when recreating an entry. Added a test that ensures proper cleanup Change-Id: Ie6660b0b02241f75092737410ae2299f8710d6b9 Signed-off-by: Nathan Skrzypczak --- src/plugins/cnat/cnat_types.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/plugins/cnat/cnat_types.h') diff --git a/src/plugins/cnat/cnat_types.h b/src/plugins/cnat/cnat_types.h index b1b5b2d2336..d3b7295f6b4 100644 --- a/src/plugins/cnat/cnat_types.h +++ b/src/plugins/cnat/cnat_types.h @@ -159,7 +159,6 @@ typedef struct cnat_timestamp_t_ typedef struct cnat_node_ctx_ { f64 now; - u64 seed; u32 thread_index; ip_address_family_t af; u8 do_trace; @@ -173,7 +172,6 @@ extern uword unformat_cnat_ep (unformat_input_t * input, va_list * args); extern cnat_timestamp_t *cnat_timestamps; extern fib_source_t cnat_fib_source; extern cnat_main_t cnat_main; -extern throttle_t cnat_throttle; extern char *cnat_error_strings[]; -- cgit 1.2.3-korg