Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion network/network_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ type route interface{}

// NewNetworkImpl creates a new container network.
func (nm *networkManager) newNetworkImpl(nwInfo *NetworkInfo, extIf *externalInterface) (*network, error) {
networkAdapterName := extIf.Name
// FixMe: Find a better way to check if a nic that is selected is not part of a vSwitch
if strings.HasPrefix(networkAdapterName, "vEthernet") {
networkAdapterName = ""
}
// Initialize HNS network.
hnsNetwork := &hcsshim.HNSNetwork{
Name: nwInfo.Id,
NetworkAdapterName: extIf.Name,
NetworkAdapterName: networkAdapterName,
DNSSuffix: nwInfo.DNS.Suffix,
DNSServerList: strings.Join(nwInfo.DNS.Servers, ","),
Policies: policy.SerializePolicies(policy.NetworkPolicy, nwInfo.Policies),
Expand Down