nat: avoid crash if plugin not enabled
Avoid crash if nat pool not allocated when issuing "show nat44 summary".
Type: fix
@@ -448,6 +448,8 @@ nat44_show_lru_summary (vlib_main_t * vm, snat_main_per_thread_data_t * tsm,
snat_session_t *s;
u32 oldest_index;
+ if (tsm->lru_pool)
+ {
#define _(n, d) \
oldest_index = \
clib_dlist_remove_head (tsm->lru_pool, tsm->n##_lru_head_index); \
@@ -469,6 +471,7 @@ nat44_show_lru_summary (vlib_main_t * vm, snat_main_per_thread_data_t * tsm,
_ (icmp, "icmp");
#undef _
}
+}
static clib_error_t *
nat44_show_summary_command_fn (vlib_main_t * vm, unformat_input_t * input,
