TSG-22699 适配控制报文修改
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <uuid/uuid.h>
|
||||
#include <tfe_fieldstat.h>
|
||||
|
||||
#include "tfe_stream.h"
|
||||
@@ -41,13 +42,15 @@ int tfe_fieldstat_intercept_incrby(struct fieldstat_easy_intercept *metrics, voi
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64_t rule_id = 0;
|
||||
ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_POLICY_ID, (unsigned char *)&rule_id, sizeof(rule_id), &out_size);
|
||||
uuid_t rule_id;
|
||||
char str_rule_id[UUID_STR_LEN] = {0};
|
||||
ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_POLICY_ID, (unsigned char *)rule_id, UUID_LEN, &out_size);
|
||||
if (ret != 0)
|
||||
{
|
||||
TFE_LOG_ERROR(g_default_logger, "failed at fetch rule_id from cmsg: %s", strerror(-ret));
|
||||
return 0;
|
||||
}
|
||||
uuid_unparse(rule_id, str_rule_id);
|
||||
|
||||
uint8_t hit_no_intercept = 0;
|
||||
ret = tfe_cmsg_get_value(cmsg, TFE_CMSG_HIT_NO_INTERCEPT, (unsigned char *)&hit_no_intercept, sizeof(hit_no_intercept), &out_size);
|
||||
@@ -98,7 +101,7 @@ int tfe_fieldstat_intercept_incrby(struct fieldstat_easy_intercept *metrics, voi
|
||||
struct field tags[5] = {0};
|
||||
FIELDSTAT_TAG_INIT(tags, nr_tags, "vsys_id", FIELD_VALUE_INTEGER, vsys_id);
|
||||
nr_tags++;
|
||||
FIELDSTAT_TAG_INIT(tags, nr_tags, "rule_id", FIELD_VALUE_INTEGER, rule_id);
|
||||
FIELDSTAT_TAG_STR(tags, nr_tags, "rule_uuid", FIELD_VALUE_CSTRING, str_rule_id);
|
||||
nr_tags++;
|
||||
uint8_t pinning_status = 0;
|
||||
if (tfe_cmsg_get_value(cmsg, TFE_CMSG_SSL_PINNING_STATE, (unsigned char *)&pinning_status, sizeof(pinning_status), &out_size) == 0)
|
||||
|
||||
Reference in New Issue
Block a user