1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libnetwork/drivers/bridge/setup_fixedcidrv4.go
Arnaud Porterie 8ca185e2ee Move bridge to drivers/
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-02-24 11:29:06 -08:00

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)
}