Decrypted Traffic Steering 回流回注测试通过
This commit is contained in:
@@ -155,7 +155,7 @@ int tfe_thread_set_affinity(int core_id)
|
||||
return pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
}
|
||||
|
||||
int tfe_proxy_fds_accept(struct tfe_proxy * ctx, int fd_downstream, int fd_upstream, struct tfe_cmsg * cmsg)
|
||||
int tfe_proxy_fds_accept(struct tfe_proxy *ctx, int fd_downstream, int fd_upstream, int fd_fake_c, int fd_fake_s, struct tfe_cmsg *cmsg)
|
||||
{
|
||||
struct tfe_thread_ctx * worker_thread_ctx = tfe_proxy_thread_ctx_acquire(ctx);
|
||||
struct tfe_stream * stream = tfe_stream_create(ctx, worker_thread_ctx);
|
||||
@@ -203,7 +203,7 @@ int tfe_proxy_fds_accept(struct tfe_proxy * ctx, int fd_downstream, int fd_upstr
|
||||
TFE_LOG_DEBUG(ctx->logger, "%p: fetch tcp options: cmsg's tcp_passthrough: %d, conf's tcp_passthrough: %d, enalbe passthrough: %d",
|
||||
stream, tcp_passthrough, ctx->tcp_all_passthrough, (ctx->tcp_all_passthrough > 0 || tcp_passthrough > 0) ? 1 : 0);
|
||||
|
||||
result = tfe_stream_init_by_fds(stream, fd_downstream, fd_upstream);
|
||||
result = tfe_stream_init_by_fds(stream, fd_downstream, fd_upstream, fd_fake_c, fd_fake_s);
|
||||
if (result < 0)
|
||||
{
|
||||
TFE_LOG_ERROR(ctx->logger, "%p, Fds(downstream = %d, upstream = %d, type = %d) accept failed.",
|
||||
@@ -430,7 +430,13 @@ int tfe_proxy_config(struct tfe_proxy * proxy, const char * profile)
|
||||
MESA_load_profile_int_def(profile, "tcp", "tcp_ttl_upstream", &proxy->tcp_options.tcp_ttl_upstream, -1);
|
||||
MESA_load_profile_int_def(profile, "tcp", "tcp_ttl_downstream", &proxy->tcp_options.tcp_ttl_downstream, -1);
|
||||
|
||||
return 0;
|
||||
MESA_load_profile_int_def(profile, "traffic_steering", "enable", &proxy->traffic_steering_options.enable, 0);
|
||||
MESA_load_profile_int_def(profile, "traffic_steering", "so_mask_client", &proxy->traffic_steering_options.so_mask_client, 0x11);
|
||||
MESA_load_profile_int_def(profile, "traffic_steering", "so_mask_server", &proxy->traffic_steering_options.so_mask_server, 0x22);
|
||||
MESA_load_profile_string_def(profile, "traffic_steering", "device_client", proxy->traffic_steering_options.device_client, sizeof(proxy->traffic_steering_options.device_client), "eth_client");
|
||||
MESA_load_profile_string_def(profile, "traffic_steering", "device_server", proxy->traffic_steering_options.device_server, sizeof(proxy->traffic_steering_options.device_server), "eth_server");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char * __str_stat_spec_map[] =
|
||||
|
||||
Reference in New Issue
Block a user