tun模式下多线程直接退出, 统一名称修改

This commit is contained in:
崔一鸣
2019-10-23 16:30:36 +08:00
parent baefa2a6bf
commit a2f03e8631
4 changed files with 11 additions and 7 deletions

View File

@@ -2248,6 +2248,10 @@ extern "C" int kni_init(){
//init tun
if(g_kni_handle->deploy_mode == KNI_DEPLOY_MODE_TUN){
if(g_kni_handle->thread_count != 1){
KNI_LOG_ERROR(local_logger, "Tun mode, thread count must be 1, while it's %d", g_kni_handle->thread_count);
goto error_out;
}
char tun_name[KNI_SYMBOL_MAX];
ret = MESA_load_profile_string_nodef(profile, section, "tun_name", tun_name, sizeof(tun_name));
if(ret < 0){