Merge pull request #3210 from rsampaio/fix_bridge_creation_3141

Bridge creation when ipv6 is not enabled
This commit is contained in:
Michael Crosby 2013-12-13 12:03:55 -08:00
commit bf91636558

View file

@ -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)