diff --git a/loader/loader_test.go b/loader/loader_test.go index aed23530..da8ba2d0 100644 --- a/loader/loader_test.go +++ b/loader/loader_test.go @@ -1689,6 +1689,7 @@ networks: workingDir, err := os.Getwd() assert.NilError(t, err) + enableIPv6 := true expected := &types.Project{ Name: "load-network-link-local-ips", WorkingDir: workingDir, @@ -1711,7 +1712,7 @@ networks: "network1": { Name: "network1", Driver: "bridge", - EnableIPv6: true, + EnableIPv6: &enableIPv6, Ipam: types.IPAMConfig{ Config: []*types.IPAMPool{ {Subnet: "10.1.0.0/16"}, diff --git a/types/types.go b/types/types.go index a5d9feb0..56af93e5 100644 --- a/types/types.go +++ b/types/types.go @@ -698,7 +698,7 @@ type NetworkConfig struct { Internal bool `yaml:"internal,omitempty" json:"internal,omitempty"` Attachable bool `yaml:"attachable,omitempty" json:"attachable,omitempty"` Labels Labels `yaml:"labels,omitempty" json:"labels,omitempty"` - EnableIPv6 bool `yaml:"enable_ipv6,omitempty" json:"enable_ipv6,omitempty"` + EnableIPv6 *bool `yaml:"enable_ipv6,omitempty" json:"enable_ipv6,omitempty"` Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"` }