From c4b5d10115d4370488ac14eb0ba7295b049a0615 Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Tue, 30 Jul 2024 13:44:01 -0700 Subject: session: add Source Deny List With this feature, session enable is now modified to have 3 modes of operation session enable -- only enable session session enable rt-backend sdl -- enable session with sdl session enable rt-backend rule-table -- enable session with rule-table session rule tables are now created on demand, upon adding first rule to the rule table. refactor session table to remove depenency from sesssion rules table. Now session rules table APIs take srtg_handle and transport proto instead of srt pointer. Type: feature Change-Id: Idde6a9b2f46b29bb931f9039636562575572aa14 Signed-off-by: Steven Luong --- src/plugins/http_static/http_static.c | 5 ++++- src/plugins/http_static/static_server.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/plugins/http_static') diff --git a/src/plugins/http_static/http_static.c b/src/plugins/http_static/http_static.c index 9a98763b312..967b8474af8 100644 --- a/src/plugins/http_static/http_static.c +++ b/src/plugins/http_static/http_static.c @@ -85,7 +85,10 @@ hss_enable_api (u32 fifo_size, u32 cache_limit, u32 prealloc_fifos, if (hsm->app_index != ~0) return VNET_API_ERROR_APP_ALREADY_ATTACHED; - vnet_session_enable_disable (hsm->vlib_main, 1 /* turn on TCP, etc. */); + session_enable_disable_args_t args = { .is_en = 1, + .rt_engine_type = + RT_BACKEND_ENGINE_RULE_TABLE }; + vnet_session_enable_disable (hsm->vlib_main, &args); rv = hss_create (hsm->vlib_main); switch (rv) diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c index 674ce8a0580..5515a98b446 100644 --- a/src/plugins/http_static/static_server.c +++ b/src/plugins/http_static/static_server.c @@ -950,7 +950,10 @@ no_input: goto done; } - vnet_session_enable_disable (vm, 1 /* turn on TCP, etc. */ ); + session_enable_disable_args_t args = { .is_en = 1, + .rt_engine_type = + RT_BACKEND_ENGINE_RULE_TABLE }; + vnet_session_enable_disable (vm, &args); if ((rv = hss_create (vm))) { -- cgit