mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
8ca185e2ee
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
16 lines
362 B
Go
16 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)
|
|
}
|