Selaa lähdekoodia

Revert "debian has iptables-legacy and iptables-nft now"

This reverts commit 7adcd856fe8e855b191a2efae9b04137f51412c7.

Libnetwork should only use the iptables binary. Iptables v1.8 and above
uses the nftables backend. The translations for all the rules used by
libnetwork is supported by the new iptables binary.

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
Arko Dasgupta 6 vuotta sitten
vanhempi
commit
068ca7d046
1 muutettua tiedostoa jossa 2 lisäystä ja 7 poistoa
  1. 2 7
      libnetwork/iptables/iptables.go

+ 2 - 7
libnetwork/iptables/iptables.go

@@ -87,16 +87,11 @@ func initFirewalld() {
 }
 }
 
 
 func detectIptables() {
 func detectIptables() {
-	path, err := exec.LookPath("iptables-legacy") // debian has iptables-legacy and iptables-nft now
+	path, err := exec.LookPath("iptables")
 	if err != nil {
 	if err != nil {
-		path, err = exec.LookPath("iptables")
-		if err != nil {
-			return
-		}
+		return
 	}
 	}
-
 	iptablesPath = path
 	iptablesPath = 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 {