1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

debian has iptables-legacy and iptables-nft now

Signed-off-by: Nathan Herald <me@nathanherald.com>
This commit is contained in:
Nathan Herald 2018-10-31 09:03:56 -07:00
parent cbf4d5ce89
commit 7adcd856fe

View file

@ -87,11 +87,16 @@ func initFirewalld() {
} }
func detectIptables() { func detectIptables() {
path, err := exec.LookPath("iptables") path, err := exec.LookPath("iptables-legacy") // debian has iptables-legacy and iptables-nft now
if err != nil { if err != nil {
return path, err = exec.LookPath("iptables")
if err != nil {
return
}
} }
iptablesPath = path iptablesPath = path
supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil
mj, mn, mc, err := GetVersion() mj, mn, mc, err := GetVersion()
if err != nil { if err != nil {