Skip to content

Commit

Permalink
buildNetworkRelatedPath in netns network mode
Browse files Browse the repository at this point in the history
Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
  • Loading branch information
zhuangqh authored and rudyfly committed May 13, 2019
1 parent b0d932d commit 602298d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions daemon/mgr/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,6 @@ func (mgr *ContainerManager) prepareContainerNetwork(ctx context.Context, c *Con
return nil
}

// network is prepared by upper system. do nothing here.
if IsNetNS(networkMode) {
return nil
}

// initialise host network mode
if IsHost(networkMode) {
hostname, err := os.Hostname()
Expand All @@ -704,6 +699,11 @@ func (mgr *ContainerManager) prepareContainerNetwork(ctx context.Context, c *Con
return err
}

// network is prepared by upper system. do nothing here.
if IsNetNS(networkMode) {
return nil
}

// initialise network endpoint
if c.NetworkSettings == nil {
return nil
Expand Down

0 comments on commit 602298d

Please sign in to comment.