Browse code

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>

Sebastiaan van Stijn authored on 2018/11/01 10:47:28
Showing 3 changed files
... ...
@@ -3,7 +3,7 @@
3 3
 # LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
4 4
 # updating the binary version, consider updating github.com/docker/libnetwork
5 5
 # in vendor.conf accordingly
6
-LIBNETWORK_COMMIT=d7b61745d16675c9f548b19f06fda80d422a74f0
6
+LIBNETWORK_COMMIT=49627167f0585504fd78ed8827529aec57a9618d
7 7
 
8 8
 install_proxy() {
9 9
 	case "$1" in
... ...
@@ -36,8 +36,8 @@ github.com/mitchellh/hashstructure 2bca23e0e452137f789efbc8610126fd8b94f73b
36 36
 
37 37
 #get libnetwork packages
38 38
 
39
-# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy accordingly
40
-github.com/docker/libnetwork d7b61745d16675c9f548b19f06fda80d422a74f0
39
+# When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
40
+github.com/docker/libnetwork 49627167f0585504fd78ed8827529aec57a9618d
41 41
 github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
42 42
 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
43 43
 github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
... ...
@@ -87,11 +87,16 @@ func initFirewalld() {
87 87
 }
88 88
 
89 89
 func detectIptables() {
90
-	path, err := exec.LookPath("iptables")
90
+	path, err := exec.LookPath("iptables-legacy") // debian has iptables-legacy and iptables-nft now
91 91
 	if err != nil {
92
-		return
92
+		path, err = exec.LookPath("iptables")
93
+		if err != nil {
94
+			return
95
+		}
93 96
 	}
97
+
94 98
 	iptablesPath = path
99
+
95 100
 	supportsXlock = exec.Command(iptablesPath, "--wait", "-L", "-n").Run() == nil
96 101
 	mj, mn, mc, err := GetVersion()
97 102
 	if err != nil {