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 != "" {
|
||||
docker.NetworkBridgeIface = *bridgeName
|
||||
} else {
|
||||
docker.NetworkBridgeIface = "lxcbr0"
|
||||
docker.NetworkBridgeIface = docker.DefaultNetworkBridge
|
||||
}
|
||||
if *flDebug {
|
||||
os.Setenv("DEBUG", "1")
|
||||
|
|
|
@ -14,8 +14,9 @@ import (
|
|||
var NetworkBridgeIface string
|
||||
|
||||
const (
|
||||
portRangeStart = 49153
|
||||
portRangeEnd = 65535
|
||||
DefaultNetworkBridge = "lxcbr0"
|
||||
portRangeStart = 49153
|
||||
portRangeEnd = 65535
|
||||
)
|
||||
|
||||
// Calculates the first and last IP addresses in an IPNet
|
||||
|
|
|
@ -267,6 +267,9 @@ func NewRuntimeFromDirectory(root string) (*Runtime, error) {
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("Couldn't create Tag store: %s", err)
|
||||
}
|
||||
if NetworkBridgeIface == "" {
|
||||
NetworkBridgeIface = DefaultNetworkBridge
|
||||
}
|
||||
netManager, err := newNetworkManager(NetworkBridgeIface)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue