mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
IDM need not be bound by default vxlan-id start index
This will allow users to use the full spectrum of vxlan-ids Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
cbe520b62c
commit
1066f9ed5c
1 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ func Init(dc driverapi.DriverCallback, config map[string]interface{}) error {
|
|||
config: config,
|
||||
}
|
||||
|
||||
d.vxlanIdm, err = idm.New(nil, "vxlan-id", vxlanIDStart, vxlanIDEnd)
|
||||
d.vxlanIdm, err = idm.New(nil, "vxlan-id", 1, vxlanIDEnd)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to initialize vxlan id manager: %v", err)
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ func (n *network) obtainVxlanID(s *subnet) error {
|
|||
n.Unlock()
|
||||
|
||||
if vni == 0 {
|
||||
vni, err = n.driver.vxlanIdm.GetID()
|
||||
vni, err = n.driver.vxlanIdm.GetIDInRange(vxlanIDStart, vxlanIDEnd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue