Skip to content

Commit

Permalink
Removed redundant checks for DNS server information
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh Rawat committed Jun 17, 2021
1 parent 5811eeb commit ffcaec2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions agent/ecscni/netconfig_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ import (

// NewVPCENIPluginConfigForTaskNSSetup is used to create the configuration of vpc-eni plugin for task namespace setup.
func NewVPCENIPluginConfigForTaskNSSetup(eni *eni.ENI, cfg *Config) (*libcni.NetworkConfig, error) {
// Use the DNS server addresses of the instance ENI it would belong in the same VPC as
// the task ENI and therefore, have same DNS configuration.
dns := types.DNS{
Nameservers: eni.DomainNameServers,
}

if len(eni.DomainNameSearchList) == 0 && cfg.InstanceENIDNSServerList != nil {
dns.Nameservers = cfg.InstanceENIDNSServerList
Nameservers: cfg.InstanceENIDNSServerList,
}

eniConf := VPCENIPluginConfig{
Expand Down

0 comments on commit ffcaec2

Please sign in to comment.