From 9ca69732caad45c67e513ef343bde8c9eaba17c8 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 4 Jul 2024 22:32:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20Firewalld=20?= =?UTF-8?q?=E9=98=B2=E7=81=AB=E5=A2=99=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98=20(#5684)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/utils/firewall/client/firewalld.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/utils/firewall/client/firewalld.go b/backend/utils/firewall/client/firewalld.go index 61e084c51..e0cd33e24 100644 --- a/backend/utils/firewall/client/firewalld.go +++ b/backend/utils/firewall/client/firewalld.go @@ -108,7 +108,7 @@ func (f *Firewall) ListPort() ([]FireInfo, error) { continue } itemRule := f.loadInfo(rule) - if (len(itemRule.Port) != 0 && itemRule.Family == "ipv4") || (itemRule.Family == "ipv6" && len(itemRule.Address) != 0) { + if len(itemRule.Port) != 0 && (itemRule.Family == "ipv4" || (itemRule.Family == "ipv6" && len(itemRule.Address) != 0)) { datas = append(datas, itemRule) } }