fix: 解决 Firewalld 防火墙列表显示不全的问题 (#5684)

pull/5689/head
ssongliu 5 months ago committed by GitHub
parent 966b10fbb5
commit 9ca69732ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save