mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
try to modprobe bridge
Signed-off-by: Jessica Frazelle <jess@docker.com>
This commit is contained in:
parent
5395cdcae5
commit
b3867b8899
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
@ -113,6 +114,13 @@ func InitDriver(config *Config) error {
|
|||
addrsv6 []net.Addr
|
||||
bridgeIPv6 = "fe80::1/64"
|
||||
)
|
||||
|
||||
// try to modprobe bridge first
|
||||
// see gh#12177
|
||||
if out, err := exec.Command("modprobe", "-va", "bridge", "nf_nat").Output(); err != nil {
|
||||
logrus.Warnf("Running modprobe bridge nf_nat failed with message: %s, error: %v", out, err)
|
||||
}
|
||||
|
||||
initPortMapper()
|
||||
|
||||
if config.DefaultIp != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue