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) } }