Browse code

Merge pull request #228 from thaJeztah/19.03_backport_bump_libnetwork

[19.03 backport] bump libnetwork 5ac07abef4eee176423fdc1b870d435258e2d381

Sebastiaan van Stijn authored on 2019/05/24 04:47:57
Showing 4 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=9ff9b57c344df5cd47443ad9e65702ec85c5aeb0
6
+LIBNETWORK_COMMIT=5ac07abef4eee176423fdc1b870d435258e2d381
7 7
 
8 8
 install_proxy() {
9 9
 	case "$1" in
... ...
@@ -39,7 +39,7 @@ github.com/gofrs/flock                              7f43ea2e6a643ad441fc12d0ecc0
39 39
 # libnetwork
40 40
 
41 41
 # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
42
-github.com/docker/libnetwork                        9ff9b57c344df5cd47443ad9e65702ec85c5aeb0
42
+github.com/docker/libnetwork                        5ac07abef4eee176423fdc1b870d435258e2d381
43 43
 github.com/docker/go-events                         9461782956ad83b30282bf90e31fa6a70c255ba9
44 44
 github.com/armon/go-radix                           e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
45 45
 github.com/armon/go-metrics                         eb0af217e5e9747e41dd5303755356b62d28e3ec
... ...
@@ -48,6 +48,12 @@ func allocatePort(portMapper *portmapper.PortMapper, bnd *types.PortBinding, con
48 48
 		err  error
49 49
 	)
50 50
 
51
+	// Windows does not support a host ip for port bindings (this is validated in ConvertPortBindings()).
52
+	// If the HostIP is nil, force it to be 0.0.0.0 for use as the key in portMapper.
53
+	if bnd.HostIP == nil {
54
+		bnd.HostIP = net.IPv4zero
55
+	}
56
+
51 57
 	// Store the container interface address in the operational binding
52 58
 	bnd.IP = containerIP
53 59
 
... ...
@@ -462,7 +462,7 @@ func ConvertPortBindings(portBindings []types.PortBinding) ([]json.RawMessage, e
462 462
 			return nil, fmt.Errorf("Windows does not support more than one host port in NAT settings")
463 463
 		}
464 464
 
465
-		if len(elem.HostIP) != 0 {
465
+		if len(elem.HostIP) != 0 && !elem.HostIP.IsUnspecified() {
466 466
 			return nil, fmt.Errorf("Windows does not support host IP addresses in NAT settings")
467 467
 		}
468 468