From: Arko Dasgupta Date: Fri, 1 Mar 2019 19:43:02 +0000 (-0800) Subject: Revert "debian has iptables-legacy and iptables-nft now" X-Git-Tag: archive/raspbian/18.09.1+dfsg1-7.1+rpi1+deb10u1^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fb9224ae0f6e3c1c426e8960c1d006768862fa60;p=docker.io.git Revert "debian has iptables-legacy and iptables-nft now" 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 Origin: upstream, https://github.com/docker/libnetwork/pull/2343 Gbp-Pq: Name libnetwork-revert-iptables-legacy.patch --- diff --git a/libnetwork/iptables/iptables.go b/libnetwork/iptables/iptables.go index 6a108e93..4b8d8832 100644 --- a/libnetwork/iptables/iptables.go +++ b/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 {