Skip to content

Commit

Permalink
fix: 修改端口报错
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 17, 2024
1 parent db79d17 commit bc28719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/firewall/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (r *Firewall) Port(rule FireInfo, operation Operation) error {
return fmt.Errorf("invalid port range: %d-%d", rule.PortStart, rule.PortEnd)
}
// 不支持的切换使用rich rules
if rule.Direction != "in" || rule.Family != "ipv4" || rule.Address != "" || rule.Strategy != "accept" {
if rule.Direction != "in" || (rule.Family != "" && rule.Family != "ipv4") || rule.Address != "" || rule.Strategy != "accept" {
return r.RichRules(rule, operation)
}

Expand Down

0 comments on commit bc28719

Please sign in to comment.