Merge pull request #3210 from rsampaio/fix_bridge_creation_3141
Bridge creation when ipv6 is not enabled Upstream-commit: bf916365589aa907c6ce486d5cae66f7a4da1419 Component: engine
This commit is contained in:
@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user