Skip to content

Commit

Permalink
debian has iptables-legacy and iptables-nft now
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Herald <me@nathanherald.com>
  • Loading branch information
myobie committed Oct 31, 2018
1 parent d7b6174 commit 7da66ee
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 7da66ee

Please sign in to comment.