summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2021-08-04 15:15:49 +0800
committerliuxueli <[email protected]>2021-08-04 15:15:49 +0800
commitb862d2490d6c551a81707c5f6c8c8411fe243465 (patch)
treeec8edbff298093f9c63ffee6ed4c6042d9c7df07
parent36397f530d1745f2447effce5679a8a385693fc2 (diff)
修复未对监测策略用户自定义空间为空判断导致重启的问题v5.1.6
-rw-r--r--src/tsg_rule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp
index 0e8b50f..8533cdc 100644
--- a/src/tsg_rule.cpp
+++ b/src/tsg_rule.cpp
@@ -2100,7 +2100,7 @@ int tsg_get_vlan_id_by_monitor_rule(Maat_feather_t maat_feather, struct Maat_rul
}
user_region=tsg_get_compile_user_region(maat_feather, &(result[i]));
- if(user_region!=NULL)
+ if(user_region!=NULL && user_region->method_type==TSG_METHOD_TYPE_MIRRORED && user_region->mirror!=NULL)
{
count+=copy_vlan_id(vlan, count, user_region->mirror->vlan_id, &(result[i].config_id), 1);
tsg_free_compile_user_region(&(result[i]), user_region);
@@ -2133,7 +2133,7 @@ int tsg_set_vlan_id_to_tcpall(const struct streaminfo *a_stream, struct tcpall_c
set_struct_project(a_stream, g_tsg_para.tcpall_project_id, (void *)_context);
}
- if(_context->method_type==TSG_METHOD_TYPE_MIRRORED)
+ if(_context->method_type==TSG_METHOD_TYPE_MIRRORED && _context->vlan!=NULL)
{
for(i=0; i<vlan_num; i++)
{