修正pcap模式下解密流量转发发包缓冲区未初始化的问题

This commit is contained in:
luqiuwen
2019-06-18 09:38:07 +08:00
parent d3e6be283e
commit 8f140e0b3d
4 changed files with 18 additions and 13 deletions

View File

@@ -465,6 +465,15 @@ int traffic_mirror_init(struct tfe_proxy * proxy)
const char * profile = "./conf/pangu/pangu_pxy.conf";
const char * section = "maat";
unsigned int is_enable = 1;
MESA_load_profile_uint_def(profile, "traffic_mirror", "enable", &is_enable, 1);
if (!is_enable)
{
TFE_LOG_INFO(instance->logger, "traffic_mirror is disabled.");
return -1;
}
/* INIT DECRYPT MIRROR INSTANCE */
instance->logger = tfe_proxy_get_error_logger();
instance->nr_threads = tfe_proxy_get_work_thread_count();