We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 77babf2 + 5362e16 commit 3a7171bCopy full SHA for 3a7171b
pkg/multicloud/azure/securitygroup.go
@@ -306,9 +306,9 @@ func (region *SRegion) CreateSecurityGroup(opts *cloudprovider.SecurityGroupCrea
306
}
307
308
sortRules := func(rules []cloudprovider.SecurityRule) []SecurityRules {
309
- names := []string{}
310
securityRules := []SecurityRules{}
311
- offset := (4096-100)/len(rules) - 1
+ names := []string{}
+ offset := (4096 - 100) / (len(rules) + 1) //avoid div zero
312
for i := 0; i < len(rules); i++ {
313
rules[i].Priority = 4096 - offset*i
314
rule := convertSecurityGroupRule(rules[i])
0 commit comments