Parcourir la source

libnetwork: move resolverIPSandbox closer to where it's used

It's only used on non-Windows platforms, so let's move it there.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn il y a 1 an
Parent
commit
d4e1c072e2
2 fichiers modifiés avec 2 ajouts et 4 suppressions
  1. 0 4
      libnetwork/sandbox.go
  2. 2 0
      libnetwork/sandbox_dns_unix.go

+ 0 - 4
libnetwork/sandbox.go

@@ -99,10 +99,6 @@ type containerConfig struct {
 	exposedPorts      []types.TransportPort
 }
 
-const (
-	resolverIPSandbox = "127.0.0.11"
-)
-
 // ID returns the ID of the sandbox.
 func (sb *Sandbox) ID() string {
 	return sb.id

+ 2 - 0
libnetwork/sandbox_dns_unix.go

@@ -23,6 +23,8 @@ const (
 	defaultPrefix = "/var/lib/docker/network/files"
 	dirPerm       = 0o755
 	filePerm      = 0o644
+
+	resolverIPSandbox = "127.0.0.11"
 )
 
 func (sb *Sandbox) startResolver(restore bool) {