summaryrefslogtreecommitdiff
path: root/entry/src/kni_pxy_tcp_option.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'entry/src/kni_pxy_tcp_option.cpp')
-rw-r--r--entry/src/kni_pxy_tcp_option.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/entry/src/kni_pxy_tcp_option.cpp b/entry/src/kni_pxy_tcp_option.cpp
index 5f59271..25dd28e 100644
--- a/entry/src/kni_pxy_tcp_option.cpp
+++ b/entry/src/kni_pxy_tcp_option.cpp
@@ -346,7 +346,6 @@ void pxy_tcp_option_default_param_dup(int idx, MAAT_RULE_EX_DATA *to, MAAT_RULE_
int pxy_tcp_option_rule_init(const char* conffile, void *logger)
{
- int i = 0;
int pxy_tcp_option_enable = 1;
int pxy_tcp_option_enable_override = 0;
char section[KNI_SYMBOL_MAX] = "proxy_tcp_option";
@@ -357,7 +356,9 @@ int pxy_tcp_option_rule_init(const char* conffile, void *logger)
MESA_load_profile_string_def(conffile, section, "maat_table_fqdn", g_kni_handle->maat_table_name[TABLE_SSL_FQDN], _MAX_MAAT_TABLE_NAME_LEN, "PXY_TCP_OPTION_SERVER_FQDN");
KNI_LOG_ERROR(logger, "Proxy-tcp-option: MESA_prof_load, [%s]:\n enabled: %d,enable_override:%d", section, pxy_tcp_option_enable,pxy_tcp_option_enable_override);
g_kni_handle->pxy_tcp_option_enable = pxy_tcp_option_enable;
- g_kni_handle->pxy_tcp_option_enable_override = pxy_tcp_option_enable_override;
+ //g_kni_handle->pxy_tcp_option_enable_override = pxy_tcp_option_enable_override;
+ //temp comment in version 23.04.
+ g_kni_handle->pxy_tcp_option_enable_override = 1;
MESA_load_profile_int_def(conffile, section, "client_tcp_maxseg_enable", &(g_kni_handle->pxy_tcp_option.client_tcp_maxseg_enable), 0);
MESA_load_profile_int_def(conffile, section, "client_tcp_maxseg", &(g_kni_handle->pxy_tcp_option.client_tcp_maxseg), 1460);
@@ -397,6 +398,7 @@ int pxy_tcp_option_rule_init(const char* conffile, void *logger)
KNI_LOG_ERROR(logger, "Proxy-tcp-option: Turn off tcp option");
return 0;
}
+/* temp comment in version 23.04
if(pxy_tcp_option_enable_override == 0)
{
KNI_LOG_ERROR(logger, "Proxy-tcp-option: Using configuration read from maat");
@@ -422,11 +424,11 @@ int pxy_tcp_option_rule_init(const char* conffile, void *logger)
return -1;
}
}
-
+*/
return 0;
}
-
+/*
static int pxy_tcp_option_scan_addr(Maat_feather_t maat_feather,const struct streaminfo *a_stream, Maat_rule_t *result, int result_num,scan_status_t *mid,struct pme_info *pmeinfo, void *logger)
{
struct ipaddr t_addr;
@@ -496,7 +498,11 @@ static int pxy_tcp_option_scan_addr(Maat_feather_t maat_feather,const struct str
return hit_num;
}
+*/
+
+/*
+* temp comment in version 23.04
static int pxy_tcp_option_scan_domain(Maat_feather_t maat_feather, Maat_rule_t *result, int result_num,scan_status_t *mid, struct pme_info *pmeinfo, void *logger)
{
int hit_num = 0, maat_ret = 0;
@@ -535,7 +541,9 @@ static int pxy_tcp_option_scan_domain(Maat_feather_t maat_feather, Maat_rule_t *
}
return hit_num;
}
+*/
+/*
static struct Maat_rule_t *pxy_tcp_option_decision_criteria(Maat_rule_t *result, int result_num)
{
int i=0;
@@ -560,7 +568,19 @@ static struct Maat_rule_t *pxy_tcp_option_decision_criteria(Maat_rule_t *result,
}
return p_result;
}
+*/
+int pxy_tcp_option_param_get(struct pme_info *pmeinfo, void *logger)
+{
+ struct proxy_tcp_option *pxy_tcpop = &pmeinfo->pxy_tcp_option;
+
+ memcpy((void *)pxy_tcpop, (const void *)&g_kni_handle->pxy_tcp_option, sizeof(g_kni_handle->pxy_tcp_option));
+ KNI_LOG_DEBUG(logger,"Proxy-tcp-option: Using override configuration, streamid = %s", pmeinfo->stream_traceid);
+ return 0;
+}
+
+/*
+* Temp comment in version 23.04
int pxy_tcp_option_get_param(Maat_feather_t maat_feather,const struct streaminfo *a_stream,struct pme_info *pmeinfo, void *logger)
{
int scan_ret = 0, hit_num = 0, is_not_default = 0, ret = 0;
@@ -627,7 +647,7 @@ int pxy_tcp_option_get_param(Maat_feather_t maat_feather,const struct streaminfo
}
return ret;
}
-
+*/
void pxy_tcp_option_modify_mss(struct pme_info *pmeinfo,void *logger)
{