mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 20:49:03 +08:00
fix: 解决 Fail2ban 禁用方式切换失败的问题 (#3704)
This commit is contained in:
parent
e85ed7427a
commit
bbe1161dc2
@ -107,7 +107,7 @@ func (u *Fail2BanService) UpdateConf(req dto.Fail2BanUpdate) error {
|
||||
if req.Value == "firewallcmd-ipset" || req.Value == "ufw" {
|
||||
itemName := "ufw"
|
||||
if req.Value == "firewallcmd-ipset" {
|
||||
itemName = "firewallcmd"
|
||||
itemName = "firewalld"
|
||||
}
|
||||
client, err := firewall.NewFirewallClient()
|
||||
if err != nil {
|
||||
|
@ -106,6 +106,7 @@ func (f *Firewall) ListPort() ([]FireInfo, error) {
|
||||
}
|
||||
itemRule := f.loadInfo(rule)
|
||||
if len(itemRule.Port) != 0 && itemRule.Family == "ipv4" {
|
||||
itemRule.Family = ""
|
||||
datas = append(datas, itemRule)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user