rename security_zone to domain

This commit is contained in:
luwenpeng
2024-01-15 14:31:38 +08:00
parent a045c04f8d
commit 8f685bc018
10 changed files with 80 additions and 80 deletions

View File

@@ -88,7 +88,7 @@ uint32_t tuple6_hash(const struct tuple6 *tuple)
uint32_t dst_port_hash = 0;
uint32_t hash = crc32_hash(&tuple->ip_type, sizeof(tuple->ip_type), 0);
hash = crc32_hash(&tuple->ip_proto, sizeof(tuple->ip_proto), hash);
hash = crc32_hash(&tuple->security_zone, sizeof(tuple->security_zone), hash);
hash = crc32_hash(&tuple->domain, sizeof(tuple->domain), hash);
if (tuple->ip_type == IP_TYPE_V4)
{
@@ -241,7 +241,7 @@ int tuple5_cmp(const struct tuple5 *tuple_a, const struct tuple5 *tuple_b)
int tuple6_cmp(const struct tuple6 *tuple_a, const struct tuple6 *tuple_b)
{
if (tuple_a->security_zone != tuple_b->security_zone)
if (tuple_a->domain != tuple_b->domain)
{
return -1;
}
@@ -351,7 +351,7 @@ void tuple6_reverse(const struct tuple6 *in, struct tuple6 *out)
{
out->ip_type = in->ip_type;
out->ip_proto = in->ip_proto;
out->security_zone = in->security_zone;
out->domain = in->domain;
out->src_port = in->dst_port;
out->dst_port = in->src_port;
@@ -445,8 +445,8 @@ void tuple6_tostring(const struct tuple6 *tuple, char *buf, uint32_t size)
inet_ntop(AF_INET6, &tuple->dst_addr.v6, dst_addr, INET6_ADDRSTRLEN);
}
snprintf(buf, size, "%s:%u -> %s:%u, proto: %u, zone: %lu",
snprintf(buf, size, "%s:%u -> %s:%u, proto: %u, domain: %lu",
src_addr, ntohs(tuple->src_port),
dst_addr, ntohs(tuple->dst_port),
tuple->ip_proto, tuple->security_zone);
tuple->ip_proto, tuple->domain);
}