mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move the default bridge name to a constant
This commit is contained in:
parent
aa4bf4284b
commit
1b370f9d8d
3 changed files with 7 additions and 3 deletions
|
@ -27,7 +27,7 @@ func main() {
|
||||||
if *bridgeName != "" {
|
if *bridgeName != "" {
|
||||||
docker.NetworkBridgeIface = *bridgeName
|
docker.NetworkBridgeIface = *bridgeName
|
||||||
} else {
|
} else {
|
||||||
docker.NetworkBridgeIface = "lxcbr0"
|
docker.NetworkBridgeIface = docker.DefaultNetworkBridge
|
||||||
}
|
}
|
||||||
if *flDebug {
|
if *flDebug {
|
||||||
os.Setenv("DEBUG", "1")
|
os.Setenv("DEBUG", "1")
|
||||||
|
|
|
@ -14,8 +14,9 @@ import (
|
||||||
var NetworkBridgeIface string
|
var NetworkBridgeIface string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
portRangeStart = 49153
|
DefaultNetworkBridge = "lxcbr0"
|
||||||
portRangeEnd = 65535
|
portRangeStart = 49153
|
||||||
|
portRangeEnd = 65535
|
||||||
)
|
)
|
||||||
|
|
||||||
// Calculates the first and last IP addresses in an IPNet
|
// Calculates the first and last IP addresses in an IPNet
|
||||||
|
|
|
@ -267,6 +267,9 @@ func NewRuntimeFromDirectory(root string) (*Runtime, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Couldn't create Tag store: %s", err)
|
return nil, fmt.Errorf("Couldn't create Tag store: %s", err)
|
||||||
}
|
}
|
||||||
|
if NetworkBridgeIface == "" {
|
||||||
|
NetworkBridgeIface = DefaultNetworkBridge
|
||||||
|
}
|
||||||
netManager, err := newNetworkManager(NetworkBridgeIface)
|
netManager, err := newNetworkManager(NetworkBridgeIface)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue