diff options
| author | luwenpeng <[email protected]> | 2021-03-08 17:33:17 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2021-04-21 13:26:07 +0800 |
| commit | 1fe60d2428f231eb3bd68b0ecfb479ab25689405 (patch) | |
| tree | 1f61a044cf24ffcf3524259ba087033c7c981e23 /platform/src/proxy.cpp | |
| parent | 1c37ae746df4e8cb4cb242af5a9a2ce4a95a0d21 (diff) | |
废除 tfe-kmod, tfe 直接与 kni 通信
* 新增 enable_kni_v3=1 配置项
* develop_build_release 分支关闭 ASAN 检测
* 修正根据 CMSG 恢复 TCP 链接时没有正确填写 TCP 时间戳启用选项的问题
Diffstat (limited to 'platform/src/proxy.cpp')
| -rw-r--r-- | platform/src/proxy.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp index 0da98c0..23c4cf3 100644 --- a/platform/src/proxy.cpp +++ b/platform/src/proxy.cpp @@ -45,6 +45,7 @@ #include <tcp_stream.h> #include <acceptor_kni_v1.h> #include <acceptor_kni_v2.h> +#include <acceptor_kni_v3.h> #include <watchdog_kni.h> #include <key_keeper.h> @@ -499,6 +500,10 @@ void tfe_proxy_acceptor_init(struct tfe_proxy * proxy, const char * profile) { MESA_load_profile_uint_def(profile, "system", "enable_kni_v1", &proxy->en_kni_v1_acceptor, 0); MESA_load_profile_uint_def(profile, "system", "enable_kni_v2", &proxy->en_kni_v2_acceptor, 1); + MESA_load_profile_uint_def(profile, "system", "enable_kni_v3", &proxy->en_kni_v3_acceptor, 0); + + int ret = proxy->en_kni_v1_acceptor + proxy->en_kni_v2_acceptor + proxy->en_kni_v3_acceptor; + CHECK_OR_EXIT((ret == 1), "Invalid KNI acceptor. Exit."); if (proxy->en_kni_v1_acceptor) { @@ -512,6 +517,12 @@ void tfe_proxy_acceptor_init(struct tfe_proxy * proxy, const char * profile) CHECK_OR_EXIT(g_default_proxy->kni_v2_acceptor, "Failed at init KNIv2 acceptor. Exit. "); } + if (proxy->en_kni_v3_acceptor) + { + g_default_proxy->kni_v3_acceptor = acceptor_kni_v3_create(g_default_proxy, profile, g_default_logger); + CHECK_OR_EXIT(g_default_proxy->kni_v3_acceptor, "Failed at init KNIv3 acceptor. Exit. "); + } + return; } |
