瀏覽代碼

Merge pull request #2343 from arkodg/remove-iptables-legacy

Revert "debian has iptables-legacy and iptables-nft now"
Flavio Crisciani 6 年之前
父節點
當前提交
daaa8f1e78
共有 1 個文件被更改,包括 2 次插入7 次删除
  1. 2 7
      libnetwork/iptables/iptables.go

+ 2 - 7
libnetwork/iptables/iptables.go

@@ -87,16 +87,11 @@ func initFirewalld() {
 }
 
 func detectIptables() {
-	path, err := exec.LookPath("iptables-legacy") // debian has iptables-legacy and iptables-nft now
+	path, err := exec.LookPath("iptables")
 	if err != nil {
-		path, err = exec.LookPath("iptables")
-		if err != nil {
-			return
-		}
+		return
 	}
-
 	iptablesPath = path
-
 	supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil
 	mj, mn, mc, err := GetVersion()
 	if err != nil {