Changed snake case naming to camelCase
Signed-off-by: Peter Choi <phkchoi89@gmail.com> Upstream-commit: ae907e7af16136225417242ef5d55d3f6062fb3b Component: engine
This commit is contained in:
@@ -260,7 +260,7 @@ func Exists(table Table, chain string, rule ...string) bool {
|
||||
|
||||
// parse "iptables -S" for the rule (this checks rules in a specific chain
|
||||
// in a specific table)
|
||||
rule_string := strings.Join(rule, " ")
|
||||
ruleString := strings.Join(rule, " ")
|
||||
existingRules, _ := exec.Command("iptables", "-t", string(table), "-S", chain).Output()
|
||||
|
||||
// regex to replace ips in rule
|
||||
@@ -269,7 +269,7 @@ func Exists(table Table, chain string, rule ...string) bool {
|
||||
|
||||
return strings.Contains(
|
||||
re.ReplaceAllString(string(existingRules), "?"),
|
||||
re.ReplaceAllString(rule_string, "?"),
|
||||
re.ReplaceAllString(ruleString, "?"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user