diff options
| author | luwenpeng <[email protected]> | 2021-07-29 11:29:11 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2021-07-29 11:29:11 +0800 |
| commit | 67be58f6ea817974d82ba04febbccdfe9edaad13 (patch) | |
| tree | 3d6807494e43b6cf5ea0c7791c6f9fc05db15fe9 | |
| parent | 319afbc11b8519969aa49669c15ebe3f88b441cc (diff) | |
TSG-7234 调整Proxy的解密流量转发的配置,以适配TSG-9140下解密流量转发需求v4.5.7-202107
| -rw-r--r-- | conf/tfe/tfe.conf | 1 | ||||
| -rw-r--r-- | plugin/business/traffic-mirror/include/traffic_mirror.h | 1 | ||||
| -rw-r--r-- | plugin/business/traffic-mirror/src/entry.cpp | 3 |
3 files changed, 4 insertions, 1 deletions
diff --git a/conf/tfe/tfe.conf b/conf/tfe/tfe.conf index 123117c..e5ca8ea 100644 --- a/conf/tfe/tfe.conf +++ b/conf/tfe/tfe.conf @@ -150,6 +150,7 @@ enable=1 device=eth4 # 0:TRAFFIC_MIRROR_ETHDEV_AF_PACKET; 1:TRAFFIC_MIRROR_ETHDEV_MARSIO type=1 +default_vlan_id_for_mac=0 table_info=resource/pangu/table_info_traffic_mirror.conf stat_file=log/traffic_mirror.status diff --git a/plugin/business/traffic-mirror/include/traffic_mirror.h b/plugin/business/traffic-mirror/include/traffic_mirror.h index d9828e1..b8d3f8a 100644 --- a/plugin/business/traffic-mirror/include/traffic_mirror.h +++ b/plugin/business/traffic-mirror/include/traffic_mirror.h @@ -23,6 +23,7 @@ struct traffic_mirror_instance void * logger; unsigned int enable; unsigned int nr_threads; + unsigned int default_vlan_id_for_mac; Maat_feather_t maat_feather; int policy_table_id; diff --git a/plugin/business/traffic-mirror/src/entry.cpp b/plugin/business/traffic-mirror/src/entry.cpp index 50b336d..1066d1a 100644 --- a/plugin/business/traffic-mirror/src/entry.cpp +++ b/plugin/business/traffic-mirror/src/entry.cpp @@ -286,7 +286,7 @@ void profile_table_ex_data_new_cb(int table_id, const char * key, const char * t } ex_data->ether_addrs[iter] = ether_addr_aton; - ex_data->vlans[iter] = 0; + ex_data->vlans[iter] = instance->default_vlan_id_for_mac; iter++; } @@ -451,6 +451,7 @@ static int traffic_mirror_ethdev_init(struct traffic_mirror_instance * instance) return -1; } + MESA_load_profile_uint_def(profile, "traffic_mirror", "default_vlan_id_for_mac", &(instance->default_vlan_id_for_mac), 0); unsigned int device_type; MESA_load_profile_uint_def(profile, "traffic_mirror", "type", &device_type, TRAFFIC_MIRROR_ETHDEV_AF_PACKET); |
