mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
17 lines
362 B
Go
17 lines
362 B
Go
|
package bridge
|
||
|
|
||
|
import (
|
||
|
log "github.com/Sirupsen/logrus"
|
||
|
"github.com/docker/docker/daemon/networkdriver/ipallocator"
|
||
|
)
|
||
|
|
||
|
func SetupFixedCIDRv4(i *Interface) error {
|
||
|
addrv4, _, err := i.Addresses()
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
log.Debugf("Using IPv4 subnet: %v", i.Config.FixedCIDR)
|
||
|
return ipallocator.RegisterSubnet(addrv4.IPNet, i.Config.FixedCIDR)
|
||
|
}
|