TSG-15510 修复No Intercept没有发送metrics
This commit is contained in:
@@ -1225,14 +1225,13 @@ static int handle_session_opening(struct metadata *meta, struct ctrl_pkt_parser
|
||||
}
|
||||
raw_packet_parser_get_most_inner_tuple4(&raw_parser, &inner_tuple4, logger);
|
||||
|
||||
ret = intercept_policy_enforce(thread->ref_proxy->int_ply_enforcer, parser->cmsg);
|
||||
if (ret != 0) {
|
||||
is_passthrough = 1;
|
||||
set_passthrough_reason(parser->cmsg, reason_invalid_intercept_param);
|
||||
goto passthrough;
|
||||
}
|
||||
if (parser->intercpet_data == 0) {
|
||||
ret = intercept_policy_enforce(thread->ref_proxy->int_ply_enforcer, parser->cmsg);
|
||||
if (ret != 0) {
|
||||
is_passthrough = 1;
|
||||
set_passthrough_reason(parser->cmsg, reason_invalid_intercept_param);
|
||||
goto passthrough;
|
||||
}
|
||||
|
||||
tfe_cmsg_get_value(parser->cmsg, TFE_CMSG_HIT_NO_INTERCEPT, (unsigned char *)&hit_no_intercept, sizeof(hit_no_intercept), &out_size);
|
||||
if (hit_no_intercept == 1) {
|
||||
is_passthrough = 1;
|
||||
@@ -1423,7 +1422,7 @@ static int handle_session_closing(struct metadata *meta, struct ctrl_pkt_parser
|
||||
{
|
||||
struct session_ctx *s_ctx = (struct session_ctx *)node->val_data;
|
||||
TFE_LOG_INFO(logger, "%s: session %lu closing", LOG_TAG_PKTIO, s_ctx->session_id);
|
||||
tfe_set_intercept_metric(acceptor_ctx->metric, s_ctx->cmsg, 1, s_ctx->c2s_info.rx.n_pkts, s_ctx->c2s_info.rx.n_bytes, s_ctx->s2c_info.rx.n_pkts, s_ctx->s2c_info.rx.n_bytes, thread_seq);
|
||||
tfe_set_intercept_metric(acceptor_ctx->metric, s_ctx->cmsg, 1, s_ctx->c2s_info.rx.n_pkts, s_ctx->c2s_info.rx.n_bytes, s_ctx->s2c_info.rx.n_pkts, s_ctx->s2c_info.rx.n_bytes, thread_seq, s_ctx->c2s_info.is_e2i_dir);
|
||||
session_table_delete_by_id(thread->session_table, meta->session_id);
|
||||
ATOMIC_DEC(&(packet_io_fs->session_num));
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user