summaryrefslogtreecommitdiff
path: root/entry/src/kni_entry.cpp
diff options
context:
space:
mode:
authorfumingwei <[email protected]>2023-04-28 18:03:22 +0800
committerfumingwei <[email protected]>2023-04-28 18:19:10 +0800
commit2e19f0a9d79a43f3a419830a9df9c1bf384ada32 (patch)
treec8371825f04f624ce8dffe3cf2d16e80c7f9e63b /entry/src/kni_entry.cpp
parent19d0a2bd4867f81e2d747e55af950d409538de1b (diff)
feature:TSG-14915:kni适配新版本tfe cmsg修改
Diffstat (limited to 'entry/src/kni_entry.cpp')
-rw-r--r--entry/src/kni_entry.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/entry/src/kni_entry.cpp b/entry/src/kni_entry.cpp
index 5b7c2b2..1206007 100644
--- a/entry/src/kni_entry.cpp
+++ b/entry/src/kni_entry.cpp
@@ -199,9 +199,9 @@ static int log_generate(struct pme_info *pmeinfo){
if(pmeinfo->protocol == PROTO_SSL){
TLD_append(tld_handle, (char*)"ssl_sni", (void*)pmeinfo->domain.sni, TLD_TYPE_STRING);
//pinning state: from tfe
- TLD_append(tld_handle, (char*)"ssl_pinningst", (void*)pmeinfo->ssl_pinningst, TLD_TYPE_LONG);
+ TLD_append(tld_handle, (char*)"ssl_pinningst", (void*)(long)pmeinfo->ssl_pinningst, TLD_TYPE_LONG);
//intercept state: from tfe
- TLD_append(tld_handle, (char*)"ssl_intercept_state", (void*)pmeinfo->ssl_intercept_state, TLD_TYPE_LONG);
+ TLD_append(tld_handle, (char*)"ssl_intercept_state", (void*)(long)pmeinfo->ssl_intercept_state, TLD_TYPE_LONG);
//ssl upstream latency: from tfe
TLD_append(tld_handle, (char*)"ssl_server_side_latency", (void*)pmeinfo->ssl_server_side_latency, TLD_TYPE_LONG);
//ssl downstream latency: from tfe
@@ -215,7 +215,7 @@ static int log_generate(struct pme_info *pmeinfo){
TLD_append(tld_handle, (char*)"ssl_error", (void*)pmeinfo->ssl_error, TLD_TYPE_STRING);
//ssl cert verify
if(pmeinfo->ssl_cert_verify != -1){
- TLD_append(tld_handle, (char*)"ssl_cert_verify", (void*)pmeinfo->ssl_cert_verify, TLD_TYPE_LONG);
+ TLD_append(tld_handle, (char*)"ssl_cert_verify", (void*)(long)pmeinfo->ssl_cert_verify, TLD_TYPE_LONG);
}
if (pmeinfo->ssl_intercept_state == 0){
if (strlen(pmeinfo->ssl_passthrough_reason))
@@ -619,7 +619,7 @@ static unsigned char* kni_cmsg_serialize_header_new(struct pme_info *pmeinfo, st
char src_mac[6] = {0};
char dst_mac[6] = {0};
- int policy_id;
+ uint64_t policy_id;
unsigned int stream_common_direction;
switch(pmeinfo->protocol)
@@ -688,7 +688,7 @@ static unsigned char* kni_cmsg_serialize_header_new(struct pme_info *pmeinfo, st
ret = wrapped_kni_cmsg_set(cmsg, TFE_CMSG_TCP_RESTORE_INFO_PACKET_CUR_DIR, (const unsigned char*)&stream_curdir, 1, pmeinfo);
if(ret < 0) goto error_out;
//maat policy id
- policy_id = pmeinfo->policy_id;
+ policy_id = (uint64_t)pmeinfo->policy_id;
ret = wrapped_kni_cmsg_set(cmsg, TFE_CMSG_POLICY_ID, (const unsigned char*)&policy_id, sizeof(policy_id), pmeinfo);
if(ret < 0) goto error_out;
//stream trace id
@@ -1736,7 +1736,7 @@ char first_data_process(struct streaminfo *stream, struct pme_info *pmeinfo, str
pmeinfo->session_attribute = kni_pull_session_attribute_results(stream,pmeinfo);
maat_hit = 1;
char *action_str = kni_maat_action_trans(pmeinfo->action);
- KNI_LOG_INFO(logger, "intercept_policy_scan: %s, %s, maat_hit = %d, rule_id = %d, action = %d(%s), stream traceid = %s",
+ KNI_LOG_INFO(logger, "intercept_policy_scan: %s, %s, maat_hit = %d, rule_id = %u, action = %d(%s), stream traceid = %s",
pmeinfo->stream_addr, (char*)&(pmeinfo->domain), maat_hit, pmeinfo->policy_id, pmeinfo->action, action_str, pmeinfo->stream_traceid);
}
switch(pmeinfo->action){