Revert "debian has iptables-legacy and iptables-nft now"
authorArko Dasgupta <arko.dasgupta@docker.com>
Fri, 1 Mar 2019 19:43:02 +0000 (11:43 -0800)
committerArnaud Rebillout <arnaud.rebillout@collabora.com>
Mon, 13 May 2019 02:34:45 +0000 (03:34 +0100)
This reverts commit 7da66eea9f68e4abc83ed2892114ec565eddd66a.

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>
Origin: upstream, https://github.com/docker/libnetwork/pull/2343

Gbp-Pq: Name libnetwork-revert-iptables-legacy.patch

libnetwork/iptables/iptables.go

index 6a108e93d0c57abf6ec8fad83ef18738f62432e1..4b8d8832e903560608bf4bb133445a4efccf1426 100644 (file)
@@ -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 {