[18.09 backport] update libnetwork to fix iptables compatibility on debian

Fixes a compatibility issue on recent debian versions, where iptables now uses
nft by default.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e1783a72d1b84bc3e32470c468d14445e5fba8db
Component: engine
This commit is contained in:
Sebastiaan van Stijn
2018-11-06 12:33:50 +01:00
parent 00d50de788
commit e2c5b23d49
3 changed files with 9 additions and 4 deletions

View File

@ -3,7 +3,7 @@
# LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
# updating the binary version, consider updating github.com/docker/libnetwork
# in vendor.conf accordingly
LIBNETWORK_COMMIT=6da50d1978302f04c3e2089e29112ea24812f05b
LIBNETWORK_COMMIT=8bc51fd276b549b106dbc7bf8ab18b3a01d66e64 # bump_18.09 branch
install_proxy() {
case "$1" in

View File

@ -37,7 +37,7 @@ github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b
#get libnetwork packages
# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy accordingly
github.com/docker/libnetwork 6da50d1978302f04c3e2089e29112ea24812f05b
github.com/docker/libnetwork 8bc51fd276b549b106dbc7bf8ab18b3a01d66e64 # bump_18.09 branch
github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec

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 {