about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authormaride <maride@darknebu.la>2018-09-02 01:49:26 +0200
committermaride <maride@darknebu.la>2018-09-02 01:49:26 +0200
commitcbb1ab24a40b5e84adcd44a4d0d4d7fdd9f49f5f (patch)
treeae933da90bc26b7318cccd9d00d3cff659642dca /src
parenta2540513db864492ff89f9ef8622a7d4bbec1880 (diff)
Abort on errors
Diffstat (limited to 'src')
-rw-r--r--src/container.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/container.go b/src/container.go
index 5b2075b..c9a918f 100644
--- a/src/container.go
+++ b/src/container.go
@@ -1,15 +1,15 @@
 package main
 
 import (
-	"github.com/docker/docker/api/types/container"
-	"github.com/docker/docker/api/types"
 	"fmt"
-	"time"
+	"github.com/docker/docker/api/types"
+	"github.com/docker/docker/api/types/container"
 	"github.com/docker/docker/api/types/network"
+	"time"
 )
 
 const (
-	VPNNetworkName = "vpn-network"
+	VPNNetworkName = "circus-vpnnet"
 )
 
 type ChallengeContainer struct {
@@ -24,7 +24,11 @@ func (cc ChallengeContainer) startContainer() (address string, containerID strin
 	setupContext()
 	setupDockerCLI()
 	// Set up network
-	setupNetwork()
+	err = setupNetwork()
+
+	if err != nil {
+		return "", "", err
+	}
 
 	// Create container
 	resp, err := dockerCli.ContainerCreate(dockerCtx, &container.Config{