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

17 lines
362 B
Go
Raw Normal View History

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