aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/containers/common/libnetwork/cni/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/containers/common/libnetwork/cni/config.go')
-rw-r--r--vendor/github.com/containers/common/libnetwork/cni/config.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/containers/common/libnetwork/cni/config.go b/vendor/github.com/containers/common/libnetwork/cni/config.go
index b5877879c..e801e1469 100644
--- a/vendor/github.com/containers/common/libnetwork/cni/config.go
+++ b/vendor/github.com/containers/common/libnetwork/cni/config.go
@@ -187,9 +187,6 @@ func (n *cniNetwork) NetworkInspect(nameOrID string) (types.Network, error) {
}
func createIPMACVLAN(network *types.Network) error {
- if network.Internal {
- return errors.New("internal is not supported with macvlan")
- }
if network.NetworkInterface != "" {
interfaceNames, err := internalutil.GetLiveNetworkNames()
if err != nil {
@@ -201,6 +198,9 @@ func createIPMACVLAN(network *types.Network) error {
}
if len(network.Subnets) == 0 {
network.IPAMOptions["driver"] = types.DHCPIPAMDriver
+ if network.Internal {
+ return errors.New("internal is not supported with macvlan and dhcp ipam driver")
+ }
} else {
network.IPAMOptions["driver"] = types.HostLocalIPAMDriver
}