Skip to content

Commit

Permalink
Merge pull request #2286 from thaJeztah/18.09_backport_iptables_legacy
Browse files Browse the repository at this point in the history
[18.09 backport] debian has iptables-legacy and iptables-nft now
  • Loading branch information
Flavio Crisciani authored Nov 1, 2018
2 parents 6da50d1 + d933d51 commit f27ba28
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 f27ba28

Please sign in to comment.