Skip to content

Commit 5ce033c

Browse files
author
Arko Dasgupta
committed
Revert "debian has iptables-legacy and iptables-nft now"
This reverts commit 7da66ee. 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>
1 parent 8be2d07 commit 5ce033c

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

iptables/iptables.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,11 @@ func initFirewalld() {
8787
}
8888

8989
func detectIptables() {
90-
path, err := exec.LookPath("iptables-legacy") // debian has iptables-legacy and iptables-nft now
90+
path, err := exec.LookPath("iptables")
9191
if err != nil {
92-
path, err = exec.LookPath("iptables")
93-
if err != nil {
94-
return
95-
}
92+
return
9693
}
97-
9894
iptablesPath = path
99-
10095
supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil
10196
mj, mn, mc, err := GetVersion()
10297
if err != nil {

0 commit comments

Comments
 (0)