1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #1015 from nerdalert/kernel_bump

Bumped ipvlan kernel version to >= 4.2
This commit is contained in:
Madhu Venugopal 2016-03-11 11:44:26 -08:00
commit 1fa49a3551
3 changed files with 4 additions and 4 deletions

View file

@ -20,8 +20,8 @@ func (d *driver) CreateNetwork(nid string, option map[string]interface{}, ipV4Da
if err != nil {
return fmt.Errorf("Failed to check kernel version for %s driver support: %v", ipvlanType, err)
}
// ensure Kernel version is greater then v4.0 for ipvlan support
if kv.Kernel < ipvlanKernelVer {
// ensure Kernel version is >= v4.2 for ipvlan support
if kv.Kernel < ipvlanKernelVer || (kv.Kernel == ipvlanKernelVer && kv.Major < ipvlanMajorVer) {
return fmt.Errorf("kernel version failed to meet the minimum ipvlan kernel requirement of %d.%d, found %d.%d.%d",
ipvlanKernelVer, ipvlanMajorVer, kv.Kernel, kv.Major, kv.Minor)
}

View file

@ -15,7 +15,7 @@ import (
const (
dummyPrefix = "di-" // ipvlan prefix for dummy parent interface
ipvlanKernelVer = 4 // minimum ipvlan kernel support
ipvlanMajorVer = 0 // minimum ipvlan major kernel support
ipvlanMajorVer = 2 // minimum ipvlan major kernel support
)
// createIPVlan Create the ipvlan slave specifying the source name

View file

@ -20,7 +20,7 @@ func (d *driver) CreateNetwork(nid string, option map[string]interface{}, ipV4Da
if err != nil {
return fmt.Errorf("failed to check kernel version for %s driver support: %v", macvlanType, err)
}
// ensure Kernel version is greater then v3.9 for macvlan support
// 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)