Skip to content

Commit 82a316f

Browse files
Fix static lint check
Signed-off-by: Abhishek Pandey <abhpandey@microsoft.com>
1 parent d880731 commit 82a316f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

pkg/ovs/ovn-nb-acl.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,11 +1133,14 @@ func (c *OVNNbClient) newSgRuleACL(sgName, direction string, rule kubeovnv1.Secu
11331133
}
11341134
}
11351135

1136-
action := ovnnb.ACLActionDrop
1137-
if rule.Policy == kubeovnv1.SgPolicyAllow {
1136+
var action string
1137+
switch rule.Policy {
1138+
case kubeovnv1.SgPolicyAllow:
11381139
action = ovnnb.ACLActionAllowRelated
1139-
} else if rule.Policy == kubeovnv1.SgPolicyPass {
1140+
case kubeovnv1.SgPolicyPass:
11401141
action = ovnnb.ACLActionPass
1142+
default:
1143+
action = ovnnb.ACLActionDrop
11411144
}
11421145

11431146
highestPriority, _ := strconv.Atoi(util.SecurityGroupHighestPriority)

0 commit comments

Comments
 (0)