|
@@ -116,11 +116,7 @@ func detectIptables() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
iptablesPath = path
|
|
iptablesPath = path
|
|
- path, err = exec.LookPath("ip6tables")
|
|
|
|
- if err != nil {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- ip6tablesPath = path
|
|
|
|
|
|
+
|
|
supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil
|
|
supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil
|
|
mj, mn, mc, err := GetVersion()
|
|
mj, mn, mc, err := GetVersion()
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -128,6 +124,13 @@ func detectIptables() {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
supportsCOpt = supportsCOption(mj, mn, mc)
|
|
supportsCOpt = supportsCOption(mj, mn, mc)
|
|
|
|
+
|
|
|
|
+ path, err = exec.LookPath("ip6tables")
|
|
|
|
+ if err != nil {
|
|
|
|
+ return
|
|
|
|
+ } else {
|
|
|
|
+ ip6tablesPath = path
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
func initDependencies() {
|
|
func initDependencies() {
|