Merge pull request #3210 from rsampaio/fix_bridge_creation_3141
Bridge creation when ipv6 is not enabled
This commit is contained in:
commit
bf91636558
1 changed files with 5 additions and 1 deletions
|
@ -178,7 +178,11 @@ func CreateBridgeIface(config *DaemonConfig) error {
|
|||
func createBridgeIface(name string) error {
|
||||
s, err := syscall.Socket(syscall.AF_INET6, syscall.SOCK_STREAM, syscall.IPPROTO_IP)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error creating bridge creation socket: %s", err)
|
||||
utils.Debugf("Bridge socket creation failed IPv6 probably not enabled: %v", err)
|
||||
s, err = syscall.Socket(syscall.AF_INET, syscall.SOCK_STREAM, syscall.IPPROTO_IP)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error creating bridge creation socket: %s", err)
|
||||
}
|
||||
}
|
||||
defer syscall.Close(s)
|
||||
|
||||
|
|
Loading…
Reference in a new issue