Skip to content

Commit a3ab248

Browse files
committed
add ipv6 log for xdp auth
Signed-off-by: weli-l <[email protected]>
1 parent 1f79c48 commit a3ab248

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bpf/kmesh/workload/include/authz.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ match_ip_rule(struct ProtobufCBinaryData *addrInfo, __u32 preFixLen, struct bpf_
338338
} else if (type & TYPE_DSTIP) {
339339
IP6_COPY(target_addr.ip6, tuple_info->ipv6.daddr);
340340
}
341+
const char *ip_type = (type & TYPE_SRCIP) ? "srcip" : "dstip";
342+
BPF_LOG(DEBUG, AUTH, "IPv6 match %s: Target IP: %s", ip_type, ip2str(&target_addr.ip6[0], false));
341343
}
342344
return match_ipv6_rule(&rule_addr, &target_addr, preFixLen);
343345
}

0 commit comments

Comments
 (0)