session_table_t *
session_table_get (u32 table_index)
{
- if (vec_len (lookup_tables) <= table_index)
+ if (pool_is_free_index (lookup_tables, table_index))
return 0;
- return vec_elt_at_index (lookup_tables, table_index);
+ return pool_elt_at_index (lookup_tables, table_index);
}
#define foreach_hash_table_parameter \
session_table_init (session_table_t * slt, u8 fib_proto)
{
u8 all = fib_proto > FIB_PROTOCOL_IP6 ? 1 : 0;
+ int i;
#define _(af,table,parm,value) \
u32 configured_##af##_##table##_table_##parm = value;
configured_v6_halfopen_table_buckets,
configured_v6_halfopen_table_memory);
}
- session_rules_table_init (&slt->session_rules);
+
+ for (i = 0; i < TRANSPORT_N_PROTO; i++)
+ session_rules_table_init (&slt->session_rules[i]);
}
typedef struct _ip4_session_table_walk_ctx_t