Fix gosec and staticcheck lint errors from proto deprecation

This commit is contained in:
Viktor Liu
2026-03-19 13:36:29 +01:00
parent e916e0d7fa
commit 01c4d5761d
5 changed files with 10 additions and 4 deletions

View File

@@ -216,6 +216,7 @@ func (d *DefaultManager) protoRuleToFirewallRule(
r *mgmProto.FirewallRule,
ipsetName string,
) (id.RuleID, []firewall.Rule, error) {
//nolint:staticcheck // PeerIP used for backward compatibility with old management
ip := net.ParseIP(r.PeerIP)
if ip == nil {
return "", nil, fmt.Errorf("invalid IP address, skipping firewall rule")