Skip to content

Commit

Permalink
Merge pull request moby#48738 from robmry/47732_remove_windows-dns-pr…
Browse files Browse the repository at this point in the history
…oxy_featflag

Remove feature flag "windows-dns-proxy"
  • Loading branch information
thaJeztah authored Oct 24, 2024
2 parents c8ff350 + b79bba6 commit 281bdbd
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 26 deletions.
4 changes: 0 additions & 4 deletions daemon/config/config_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
6 changes: 0 additions & 6 deletions daemon/container_operations_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 4 additions & 0 deletions daemon/info_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 0 additions & 3 deletions libnetwork/network_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion libnetwork/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ type resolvConfPathConfig struct {
}

type containerConfig struct {
containerConfigOS //nolint:nolintlint,unused // only populated on windows
hostsPathConfig
resolvConfPathConfig
generic map[string]interface{}
Expand Down
7 changes: 0 additions & 7 deletions libnetwork/sandbox_options_windows.go

This file was deleted.

5 changes: 0 additions & 5 deletions libnetwork/sandbox_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 281bdbd

Please sign in to comment.