From 4deb92e71546d5d9f200298e01648d2bbee36538 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 1 Sep 2025 18:14:49 +0800 Subject: [PATCH] fix: Optimize container port detection mechanism (#10220) --- agent/utils/common/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/utils/common/common.go b/agent/utils/common/common.go index ee80ea1f0..6b0d6d271 100644 --- a/agent/utils/common/common.go +++ b/agent/utils/common/common.go @@ -213,7 +213,7 @@ func ScanPortWithProto(port int, proto string) bool { } func ScanPortWithIP(ip string, port int) bool { - if len(ip) == 0 { + if len(ip) == 0 || ip == "0.0.0.0" || ip == "::" { return ScanPort(port) } address := net.JoinHostPort(ip, fmt.Sprintf("%d", port))