mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Make use of iptablesPath variable which has the path of iptables, instead of using string iptables directly
Signed-off-by: Gaurav <gaurav.gosec@gmail.com>
This commit is contained in:
parent
029cbc1004
commit
1d5f1bb0f5
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,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)
|
||||
ruleString := strings.Join(rule, " ")
|
||||
existingRules, _ := exec.Command("iptables", "-t", string(table), "-S", chain).Output()
|
||||
existingRules, _ := exec.Command(iptablesPath, "-t", string(table), "-S", chain).Output()
|
||||
|
||||
// regex to replace ips in rule
|
||||
// because MASQUERADE rule will not be exactly what was passed
|
||||
|
|
Loading…
Add table
Reference in a new issue