summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorwangmenglan <[email protected]>2023-05-09 12:07:48 +0800
committerwangmenglan <[email protected]>2023-05-09 14:23:39 +0800
commitceffc9b16837a592a6cbbe570f9d6fe826eb0686 (patch)
treed38f1406bca5bd945623411a9e0d90cf4c82e556 /platform
parent7c3b77fb2f8de60a93a6ae2ef1c36d1e6646dbce (diff)
TSG-14930 TFE支持发送控制报文给SAPP
Diffstat (limited to 'platform')
-rw-r--r--platform/src/proxy.cpp2
-rw-r--r--platform/src/tcp_stream.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp
index 8e467bf..0f159d4 100644
--- a/platform/src/proxy.cpp
+++ b/platform/src/proxy.cpp
@@ -538,7 +538,7 @@ void tfe_proxy_acceptor_init(struct tfe_proxy * proxy, const char * profile)
MESA_load_profile_uint_def(profile, "system", "enable_kni_v1", &proxy->en_kni_v1_acceptor, 0);
MESA_load_profile_uint_def(profile, "system", "enable_kni_v2", &proxy->en_kni_v2_acceptor, 0);
MESA_load_profile_uint_def(profile, "system", "enable_kni_v3", &proxy->en_kni_v3_acceptor, 0);
- MESA_load_profile_uint_def(profile, "system", "enable_kni_v4", &proxy->en_kni_v4_acceptor, 1);
+ MESA_load_profile_uint_def(profile, "system", "enable_kni_v4", &proxy->en_kni_v4_acceptor, 0);
int ret = proxy->en_kni_v1_acceptor + proxy->en_kni_v2_acceptor + proxy->en_kni_v3_acceptor + proxy->en_kni_v4_acceptor;
CHECK_OR_EXIT((ret == 1), "Invalid KNI acceptor. Exit.");
diff --git a/platform/src/tcp_stream.cpp b/platform/src/tcp_stream.cpp
index 559aae3..ab6494d 100644
--- a/platform/src/tcp_stream.cpp
+++ b/platform/src/tcp_stream.cpp
@@ -493,6 +493,7 @@ static void __stream_bev_passthrough_readcb(struct bufferevent * bev, void * arg
TFE_PROXY_STAT_INCREASE(STAT_STREAM_BYPASS, 1);
_stream->is_first_call_rxcb = 1;
tfe_set_intercept_metric(&_stream->head, 1, 0, 0, 0, 0);
+ tfe_cmsg_set_flag(_stream->cmsg, TFE_CMSG_FLAG_USER0);
}
int inbuff_len = evbuffer_get_length(__input_buffer);
@@ -1276,6 +1277,8 @@ void ssl_downstream_create_on_success(future_result_t * result, void * user)
TFE_PROXY_STAT_INCREASE(STAT_STEERING_SSL_CONN, 1);
}
+ tfe_cmsg_set_flag(_stream->cmsg, TFE_CMSG_FLAG_USER0);
+
return;
}