daemon/config: remove commonUnixBridgeConfig

This type was added to support Solaris (which didn't support these
options). Solaris support was removed, so we can integrate this type
back into the "unix" type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-07-10 14:44:02 +02:00
parent a65f83317c
commit defeab7387
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 7 additions and 13 deletions

View file

@ -3,8 +3,6 @@
package config // import "github.com/docker/docker/daemon/config"
import (
"net"
"github.com/docker/docker/api/types"
)
@ -16,14 +14,6 @@ type CommonUnixConfig struct {
DefaultInitBinary string `json:"default-init,omitempty"`
}
type commonUnixBridgeConfig struct {
DefaultIP net.IP `json:"ip,omitempty"`
IP string `json:"bip,omitempty"`
DefaultGatewayIPv4 net.IP `json:"default-gateway,omitempty"`
DefaultGatewayIPv6 net.IP `json:"default-gateway-v6,omitempty"`
InterContainerCommunication bool `json:"icc,omitempty"`
}
// GetRuntime returns the runtime path and arguments for a given
// runtime name
func (conf *Config) GetRuntime(name string) *types.Runtime {

View file

@ -4,6 +4,7 @@ package config // import "github.com/docker/docker/daemon/config"
import (
"fmt"
"net"
containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/opts"
@ -20,10 +21,13 @@ const (
type BridgeConfig struct {
commonBridgeConfig
// These fields are common to all unix platforms.
commonUnixBridgeConfig
// Fields below here are platform specific.
DefaultIP net.IP `json:"ip,omitempty"`
IP string `json:"bip,omitempty"`
DefaultGatewayIPv4 net.IP `json:"default-gateway,omitempty"`
DefaultGatewayIPv6 net.IP `json:"default-gateway-v6,omitempty"`
InterContainerCommunication bool `json:"icc,omitempty"`
EnableIPv6 bool `json:"ipv6,omitempty"`
EnableIPTables bool `json:"iptables,omitempty"`
EnableIP6Tables bool `json:"ip6tables,omitempty"`