mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Since commit 933fcc9 (Re-remove the SetKey OCI prestart hook),
the network namespace will be set up before endpoints are
created in most cases, apart from build containers.
So, when possible, create the veth with one end in that netns
to save moving it in later. On my host, that saves about 20ms
for each bridge network a container is connected to.
Signed-off-by: Rob Murray <rob.murray@docker.com>
46 lines
1.1 KiB
Go
46 lines
1.1 KiB
Go
package libnetwork
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/docker/docker/libnetwork/osl"
|
|
)
|
|
|
|
func releaseOSSboxResources(*osl.Namespace, *Endpoint) {}
|
|
|
|
func (sb *Sandbox) updateGateway(_, _ *Endpoint) error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
func (sb *Sandbox) ExecFunc(func()) error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
func (sb *Sandbox) releaseOSSbox() error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
func (sb *Sandbox) restoreOslSandbox() error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
// NetnsPath is not implemented on Windows (Sandbox.osSbox is always nil)
|
|
func (sb *Sandbox) NetnsPath() (path string, ok bool) {
|
|
return "", false
|
|
}
|
|
|
|
func (sb *Sandbox) populateNetworkResources(context.Context, *Endpoint) error {
|
|
// not implemented on Windows (Sandbox.osSbox is always nil)
|
|
return nil
|
|
}
|
|
|
|
// IPv6Enabled always returns false on Windows as None of the Windows container
|
|
// network drivers currently support IPv6.
|
|
func (sb *Sandbox) IPv6Enabled() (enabled, ok bool) {
|
|
return false, true
|
|
}
|