|
|
@ -207,6 +207,7 @@ func (u *FirewallService) OperatePortRule(req dto.PortRuleOperate, reload bool) |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
itemPorts := req.Port |
|
|
|
for _, proto := range protos { |
|
|
|
for _, proto := range protos { |
|
|
|
if strings.Contains(req.Port, "-") { |
|
|
|
if strings.Contains(req.Port, "-") { |
|
|
|
req.Protocol = proto |
|
|
|
req.Protocol = proto |
|
|
@ -215,7 +216,7 @@ func (u *FirewallService) OperatePortRule(req dto.PortRuleOperate, reload bool) |
|
|
|
} |
|
|
|
} |
|
|
|
_ = u.addPortRecord(req) |
|
|
|
_ = u.addPortRecord(req) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ports := strings.Split(req.Port, ",") |
|
|
|
ports := strings.Split(itemPorts, ",") |
|
|
|
for _, port := range ports { |
|
|
|
for _, port := range ports { |
|
|
|
if len(port) == 0 { |
|
|
|
if len(port) == 0 { |
|
|
|
continue |
|
|
|
continue |
|
|
|