Merge pull request #2285 from myobie/iptables-legacy

debian has iptables-legacy and iptables-nft now
This commit is contained in:
Flavio Crisciani 2018-10-31 09:25:39 -07:00 committed by GitHub
commit 941f87407d

View file

@ -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 {