mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
chore: lint
This commit is contained in:
1 parent
0c2ff499c6
commit
8beb9e2679
1 file changed
+9
-3
@@ -103,10 +103,16 @@ func createIptablesChains() error {
|
||||
|
||||
var addJumpRule []string
|
||||
if firstRejectRuleNum > 0 {
|
||||
addJumpRule = append([]string{"-t", string(iptables.Filter), "-I", "INPUT",
|
||||
strconv.Itoa(firstRejectRuleNum)}, jumpRule...)
|
||||
addJumpRule = append([]string{
|
||||
"-t", string(iptables.Filter),
|
||||
"-I", "INPUT",
|
||||
strconv.Itoa(firstRejectRuleNum),
|
||||
}, jumpRule...)
|
||||
} else {
|
||||
addJumpRule = append([]string{"-t", string(iptables.Filter), "-A", "INPUT"}, jumpRule...)
|
||||
addJumpRule = append([]string{
|
||||
"-t", string(iptables.Filter),
|
||||
"-A", "INPUT",
|
||||
}, jumpRule...)
|
||||
}
|
||||
if err = ipt.RawCombinedOutput(addJumpRule...); err != nil {
|
||||
return fmt.Errorf("add %s rule '%s': %w", iptBin, strings.Join(addJumpRule, " "), err)
|
||||
|
||||
Reference in new issue
Block a user