session: session table holding free appns index 32/41732/10
authorSteven Luong <[email protected]>
Tue, 22 Oct 2024 17:44:07 +0000 (10:44 -0700)
committerFlorin Coras <[email protected]>
Wed, 6 Nov 2024 18:13:01 +0000 (18:13 +0000)
commite0c4e6e32d9cd4b1b2c9647cd12a2e6214986e07
tree3b521af4895eddf2ed7ca0dcae165c2abf60cd7d
parentafd05739d68fe7708153687e1aa177fee4411c5f
session: session table holding free appns index

session table may be shared among multiple appns's.
  app ns add id blue secret 1 if tap0
  app ns add id red secret 1 if tap0

session table holds the last added app_ns's appns_index.
If the last app_ns is deleted, session table is not free
since there is still an appns which uses the same session
table. In that case, session table is holding the free
app_ns's appns_index and it can cause problem.

The fix is to modify appns_index in session table to hold
a vector of appns_index's instead of just the appns_index
that was last added. When the app ns is deleted, remove the
deleted appns_index from the session table's vector of
appns_index's.

Type: fix

Change-Id: Ied8bc97f185071dc89b9b56656e18efbd2995131
Signed-off-by: Steven Luong <[email protected]>
src/plugins/unittest/session_test.c
src/vnet/session/application_namespace.c
src/vnet/session/session.api
src/vnet/session/session_api.c
src/vnet/session/session_lookup.c
src/vnet/session/session_sdl.c
src/vnet/session/session_table.c
src/vnet/session/session_table.h
src/vnet/session/session_test.c
test/asf/test_session.py
test/asf/test_session_sdl.py