TSG-21854 TFE使用fieldstat4序列化Manipulation Policy的metric并输出到kafka
This commit is contained in:
@@ -2061,9 +2061,7 @@ void ssl_async_downstream_create(struct future * f, struct ssl_mgr * mgr, struct
|
||||
void ssl_stream_free(struct ssl_stream * s_stream, struct event_base * evbase, struct bufferevent * bev)
|
||||
{
|
||||
UNUSED struct ssl_shutdown_ctx * sslshutctx = NULL;
|
||||
evutil_socket_t fd=-1;
|
||||
fd=bufferevent_getfd(bev);
|
||||
assert(fd==s_stream->_do_not_use.fd);
|
||||
assert(bufferevent_getfd(bev)==s_stream->_do_not_use.fd);
|
||||
unsigned long sslerr=0;
|
||||
|
||||
if (s_stream->dir == CONN_DIR_UPSTREAM)
|
||||
@@ -2217,6 +2215,7 @@ uint64_t ssl_stream_get_policy_id(struct ssl_stream *upstream)
|
||||
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(upstream->tcp_stream);
|
||||
int ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_POLICY_ID, (unsigned char *)&policy_id, sizeof(policy_id), &out_size);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
|
||||
return policy_id;
|
||||
}
|
||||
@@ -2228,6 +2227,7 @@ int ssl_stream_get_decrypted_profile_id(struct ssl_stream *upstream)
|
||||
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(upstream->tcp_stream);
|
||||
int ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_DECRYPTION_PROFILE_ID, (unsigned char *)&profile_id, sizeof(profile_id), &out_size);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
|
||||
return profile_id;
|
||||
}
|
||||
@@ -2239,6 +2239,7 @@ int ssl_stream_get_trusted_keyring_profile_id(struct ssl_stream *upstream)
|
||||
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(upstream->tcp_stream);
|
||||
int ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_KEYRING_FOR_TRUSTED_ID, (unsigned char *)&keyring_id, sizeof(keyring_id), &out_size);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
|
||||
return keyring_id;
|
||||
}
|
||||
@@ -2250,6 +2251,7 @@ int ssl_stream_get_untrusted_keyring_profile_id(struct ssl_stream *upstream)
|
||||
struct tfe_cmsg *cmsg = tfe_stream_get0_cmsg(upstream->tcp_stream);
|
||||
int ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_KEYRING_FOR_UNTRUSTED, (unsigned char *)&keyring_id, sizeof(keyring_id), &out_size);
|
||||
assert(ret == 0);
|
||||
(void)ret;
|
||||
|
||||
return keyring_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user