aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-05-29 01:03:16 -0700
committerNeale Ranns <nranns@cisco.com>2018-05-30 04:55:19 +0000
commit7ce3d13cab773226b851f627a69a4148a762592a (patch)
treed43ac93c513f7205e183e8b546bcc9156ba4970f
parentf264f0831f2106cf5f5436bf6b08c45a6c86f2f5 (diff)
session: fix session table retrieval
Change-Id: If37d644a26132c42a04927f612eec5e891066451 Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--src/vnet/session/session_table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/session/session_table.c b/src/vnet/session/session_table.c
index 5d160a4b2dc..47d19092e2b 100644
--- a/src/vnet/session/session_table.c
+++ b/src/vnet/session/session_table.c
@@ -45,9 +45,9 @@ session_table_index (session_table_t * slt)
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 \