diff --git a/platform/src/policy.cpp b/platform/src/policy.cpp index 656ed72..b850e93 100644 --- a/platform/src/policy.cpp +++ b/platform/src/policy.cpp @@ -1458,9 +1458,30 @@ void policy_enforce_select_chaining(struct selected_chaining *chaining, struct p LOG_DEBUG("%s: chaining policy %d -> sff_profile %d sf_profile_ids_num %d (after filter nearby and active)", 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); - item->sf_action = SESSION_ACTION_BYPASS; - item->sf_action_reason = ACTION_BYPASS_DUE_NO_AVAILABLE_SF; + switch (sff_param->sff_exception.fail_action) + { + case FAILURE_ACTION_BYPASS: + item->sf_action = SESSION_ACTION_BYPASS; + item->sf_action_reason = ACTION_BYPASS_DUE_FAILURE_ACTION; + break; + case FAILURE_ACTION_BLOCK: + item->sf_action = SESSION_ACTION_BLOCK; + item->sf_action_reason = ACTION_BLOCK_DUE_FAILURE_ACTION; + break; + case FAILURE_ACTION_RE_DISPATCH: + if (sff_param->sff_exception.unavail_action == UNAVAILABLE_ACTION_BYPASSS) + { + item->sf_action = SESSION_ACTION_BYPASS; + item->sf_action_reason = ACTION_BYPASS_DUE_UNAVAILABLE_ACTION; + } + else // UNAVAILABLE_ACTION_BLOCK + { + item->sf_action = SESSION_ACTION_BLOCK; + item->sf_action_reason = ACTION_BLOCK_DUE_UNAVAILABLE_ACTION; + } + break; + } + LOG_DEBUG("%s: chaining policy %d -> sff_profile %d, no sf available after filtering by 'nearby & active', %s", LOG_TAG_POLICY, policy_id, item->sff_profile_id, session_action_reason_to_string(item->sf_action_reason)); chaining->chaining_used++; sff_param_free(sff_param); continue;