bugfix: 从SF收到数据包后向其他SF转发时只封装一层g_vxlan

This commit is contained in:
luwenpeng
2023-02-22 19:55:05 +08:00
parent 823490bcd1
commit ecb9241ce9
3 changed files with 24 additions and 3 deletions

View File

@@ -1443,10 +1443,12 @@ void policy_enforce_select_chaining(struct selected_chaining *chaining, struct p
continue;
}
item->sff_forward_type = sff_param->sff_forward_type;
LOG_DEBUG("%s: chaining policy %d -> sff_profile %d sf_profile_ids_num %d (before filter nearby and sctive)", LOG_TAG_POLICY, policy_id, item->sff_profile_id, sff_param->sf_profile_ids_num);
memset(&array, 0, sizeof(array));
fixed_num_array_init(&array);
select_sf_by_nearby_and_active(enforcer, sff_param, &array);
LOG_DEBUG("%s: chaining policy %d -> sff_profile %d sf_profile_ids_num %d (after filter nearby and sctive)", LOG_TAG_POLICY, policy_id, item->sff_profile_id, fixed_num_array_count_elem(&array));
if (fixed_num_array_count_elem(&array) == 0)
{
LOG_DEBUG("%s: chaining policy %d -> sff_profile %d, no sf available after filtering by 'nearby & active', bypass current sff !!!", LOG_TAG_POLICY, policy_id, item->sff_profile_id);
@@ -1459,6 +1461,7 @@ void policy_enforce_select_chaining(struct selected_chaining *chaining, struct p
hash_value = raw_packet_parser_get_hash_value(parser, sff_param->sff_ldbc.method, dir_is_internal);
item->sf_action = select_sf_by_ldbc(hash_value, sff_param, &array, &(item->sf_profile_id), &(item->sf_action_reason));
LOG_DEBUG("%s: chaining policy %d -> sff_profile %d sf_profile_ids_num %d (after filter ldbc)", LOG_TAG_POLICY, policy_id, item->sff_profile_id, fixed_num_array_count_elem(&array));
if (item->sf_action != SESSION_ACTION_FORWARD)
{
chaining->chaining_used++;