|
1 | 1 | diff --git a/daemon/network.go b/daemon/network.go |
2 | | -index 01b5956adb..eb44df7895 100644 |
| 2 | +index 0896378906..4ab7ad55b5 100644 |
3 | 3 | --- a/daemon/network.go |
4 | 4 | +++ b/daemon/network.go |
5 | | -@@ -10,7 +10,6 @@ import ( |
6 | | - "sync" |
| 5 | +@@ -12,7 +12,6 @@ import ( |
7 | 6 |
|
8 | | - "github.com/docker/docker/api/types" |
| 7 | + "github.com/containerd/log" |
| 8 | + "github.com/docker/docker/api/types/backend" |
9 | 9 | - containertypes "github.com/docker/docker/api/types/container" |
| 10 | + "github.com/docker/docker/api/types/events" |
10 | 11 | "github.com/docker/docker/api/types/filters" |
11 | | - "github.com/docker/docker/api/types/network" |
12 | | - "github.com/docker/docker/container" |
13 | | -@@ -860,9 +859,7 @@ func buildCreateEndpointOptions(c *container.Container, n libnetwork.Network, ep |
14 | | - createOptions = append(createOptions, libnetwork.CreateOptionService(svcCfg.Name, svcCfg.ID, net.ParseIP(vip), portConfigs, svcCfg.Aliases[n.ID()])) |
| 12 | + networktypes "github.com/docker/docker/api/types/network" |
| 13 | +@@ -815,8 +814,6 @@ func buildCreateEndpointOptions(c *container.Container, n *libnetwork.Network, e |
| 14 | + var createOptions []libnetwork.EndpointOption |
| 15 | + var genericOptions = make(options.Generic) |
| 16 | + |
| 17 | +- nwName := n.Name() |
| 18 | +- |
| 19 | + if epConfig != nil { |
| 20 | + if ipam := epConfig.IPAMConfig; ipam != nil { |
| 21 | + var ipList []net.IP |
| 22 | +@@ -877,9 +874,7 @@ func buildCreateEndpointOptions(c *container.Container, n *libnetwork.Network, e |
| 23 | + createOptions = append(createOptions, libnetwork.CreateOptionService(svcCfg.Name, svcCfg.ID, vip, portConfigs, svcCfg.Aliases[nwID])) |
15 | 24 | } |
16 | 25 |
|
17 | | -- if !containertypes.NetworkMode(n.Name()).IsUserDefined() { |
| 26 | +- if !containertypes.NetworkMode(nwName).IsUserDefined() { |
18 | 27 | - createOptions = append(createOptions, libnetwork.CreateOptionDisableResolution()) |
19 | 28 | - } |
20 | 29 | + createOptions = append(createOptions, libnetwork.CreateOptionDisableResolution()) |
21 | 30 |
|
22 | | - // configs that are applicable only for the endpoint in the network |
23 | | - // to which container was connected to on docker run. |
| 31 | + epOpts, err := buildPortsRelatedCreateEndpointOptions(c, n, sb) |
| 32 | + if err != nil { |
0 commit comments