diff --git a/daemon/config/config_linux.go b/daemon/config/config_linux.go index 35c463794eef8..a12177af1a2e8 100644 --- a/daemon/config/config_linux.go +++ b/daemon/config/config_linux.go @@ -208,10 +208,6 @@ func (conf *Config) ValidatePlatformConfig() error { return errors.Wrap(err, "invalid fixed-cidr-v6") } - if _, ok := conf.Features["windows-dns-proxy"]; ok { - return errors.New("feature option 'windows-dns-proxy' is only available on Windows") - } - return verifyDefaultCgroupNsMode(conf.CgroupNamespaceMode) } diff --git a/daemon/container_operations_windows.go b/daemon/container_operations_windows.go index 787bfc668a35d..9dc5f66e09b76 100644 --- a/daemon/container_operations_windows.go +++ b/daemon/container_operations_windows.go @@ -164,12 +164,6 @@ func serviceDiscoveryOnDefaultNetwork() bool { } func buildSandboxPlatformOptions(ctr *container.Container, cfg *config.Config, sboxOptions *[]libnetwork.SandboxOption) error { - // By default, the Windows internal resolver forwards requests to external - // resolvers - but forwarding can be disabled using feature flag - // "windows-dns-proxy":false. - if doproxy, exists := cfg.Features["windows-dns-proxy"]; exists && !doproxy { - *sboxOptions = append(*sboxOptions, libnetwork.OptionDNSNoProxy()) - } return nil } diff --git a/daemon/info_windows.go b/daemon/info_windows.go index 1897aa494b6f4..7b8918475bf59 100644 --- a/daemon/info_windows.go +++ b/daemon/info_windows.go @@ -11,6 +11,10 @@ import ( // fillPlatformInfo fills the platform related info. func (daemon *Daemon) fillPlatformInfo(ctx context.Context, v *system.Info, sysInfo *sysinfo.SysInfo, cfg *configStore) error { + if _, ok := cfg.Features["windows-dns-proxy"]; ok { + v.Warnings = append(v.Warnings, ` +WARNING: Feature flag "windows-dns-proxy" has been removed, forwarding to external DNS resolvers is enabled.`) + } return nil } diff --git a/libnetwork/network_windows.go b/libnetwork/network_windows.go index 6ddfe8373b05c..108f07810773e 100644 --- a/libnetwork/network_windows.go +++ b/libnetwork/network_windows.go @@ -103,9 +103,6 @@ func addEpToResolver( epIface *EndpointInterface, resolvers []*Resolver, ) error { - if config.dnsNoProxy { - return nil - } hnsEndpoints, err := hcsshim.HNSListEndpointRequest() if err != nil { return nil diff --git a/libnetwork/sandbox.go b/libnetwork/sandbox.go index fe47f3c825b3a..97aa728578ead 100644 --- a/libnetwork/sandbox.go +++ b/libnetwork/sandbox.go @@ -92,7 +92,6 @@ type resolvConfPathConfig struct { } type containerConfig struct { - containerConfigOS //nolint:nolintlint,unused // only populated on windows hostsPathConfig resolvConfPathConfig generic map[string]interface{} diff --git a/libnetwork/sandbox_options_windows.go b/libnetwork/sandbox_options_windows.go deleted file mode 100644 index 8022e400d2412..0000000000000 --- a/libnetwork/sandbox_options_windows.go +++ /dev/null @@ -1,7 +0,0 @@ -package libnetwork - -func OptionDNSNoProxy() SandboxOption { - return func(sb *Sandbox) { - sb.config.dnsNoProxy = true - } -} diff --git a/libnetwork/sandbox_windows.go b/libnetwork/sandbox_windows.go index 7b5797125489d..51daada8aabdf 100644 --- a/libnetwork/sandbox_windows.go +++ b/libnetwork/sandbox_windows.go @@ -6,11 +6,6 @@ import ( "github.com/docker/docker/libnetwork/osl" ) -// Windows-specific container configuration flags. -type containerConfigOS struct { - dnsNoProxy bool -} - func releaseOSSboxResources(*osl.Namespace, *Endpoint) {} func (sb *Sandbox) updateGateway(*Endpoint) error {