From 23db1c36a6088eec49e5e3142ed618d2449ea7f8 Mon Sep 17 00:00:00 2001 From: Gaurav Date: Thu, 30 Apr 2015 18:08:03 +0530 Subject: [PATCH] Make use of iptablesPath variable which has the path of iptables, instead of using string iptables directly Signed-off-by: Gaurav --- iptables/iptables.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iptables/iptables.go b/iptables/iptables.go index 0cfcca7..9983ec6 100644 --- a/iptables/iptables.go +++ b/iptables/iptables.go @@ -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