Skip to content

Commit

Permalink
Merge pull request moby#2287 from thaJeztah/18.03_backport_iptables_l…
Browse files Browse the repository at this point in the history
…egacy

[18.03 backport] debian has iptables-legacy and iptables-nft now
  • Loading branch information
Flavio Crisciani authored Nov 1, 2018
2 parents c2b3907 + 6c68b9f commit 5a2b0bd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions iptables/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,16 @@ func initFirewalld() {
}

func detectIptables() {
path, err := exec.LookPath("iptables")
path, err := exec.LookPath("iptables-legacy") // debian has iptables-legacy and iptables-nft now
if err != nil {
return
path, err = exec.LookPath("iptables")
if err != nil {
return
}
}

iptablesPath = path

supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil
mj, mn, mc, err := GetVersion()
if err != nil {
Expand Down

0 comments on commit 5a2b0bd

Please sign in to comment.