diff --git a/libnetwork/drivers/macvlan/macvlan_network.go b/libnetwork/drivers/macvlan/macvlan_network.go index a9f6290623..350eb68402 100644 --- a/libnetwork/drivers/macvlan/macvlan_network.go +++ b/libnetwork/drivers/macvlan/macvlan_network.go @@ -3,7 +3,6 @@ package macvlan import ( "fmt" - "github.com/docker/docker/pkg/parsers/kernel" "github.com/docker/docker/pkg/stringid" "github.com/docker/libnetwork/driverapi" "github.com/docker/libnetwork/netlabel" @@ -17,15 +16,7 @@ import ( // CreateNetwork the network for the specified driver type func (d *driver) CreateNetwork(nid string, option map[string]interface{}, nInfo driverapi.NetworkInfo, ipV4Data, ipV6Data []driverapi.IPAMData) error { defer osl.InitOSContext()() - kv, err := kernel.GetKernelVersion() - if err != nil { - return fmt.Errorf("failed to check kernel version for %s driver support: %v", macvlanType, err) - } - // ensure Kernel version is >= v3.9 for macvlan support - if kv.Kernel < macvlanKernelVer || (kv.Kernel == macvlanKernelVer && kv.Major < macvlanMajorVer) { - return fmt.Errorf("kernel version failed to meet the minimum macvlan kernel requirement of %d.%d, found %d.%d.%d", - macvlanKernelVer, macvlanMajorVer, kv.Kernel, kv.Major, kv.Minor) - } + // reject a null v4 network if len(ipV4Data) == 0 || ipV4Data[0].Pool.String() == "0.0.0.0/0" { return fmt.Errorf("ipv4 pool is empty") diff --git a/libnetwork/drivers/macvlan/macvlan_setup.go b/libnetwork/drivers/macvlan/macvlan_setup.go index fc33ebd707..86bcca2f03 100644 --- a/libnetwork/drivers/macvlan/macvlan_setup.go +++ b/libnetwork/drivers/macvlan/macvlan_setup.go @@ -11,9 +11,7 @@ import ( ) const ( - dummyPrefix = "dm-" // macvlan prefix for dummy parent interface - macvlanKernelVer = 3 // minimum macvlan kernel support - macvlanMajorVer = 9 // minimum macvlan major kernel support + dummyPrefix = "dm-" // macvlan prefix for dummy parent interface ) // Create the macvlan slave specifying the source name