Browse Source

Merge pull request #2259 from resin-os/handle-invalid-default-gateways

bridge: fix error handling for stale default gateways
Christopher Adam Telfer 7 years ago
parent
commit
e29452841e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libnetwork/drivers/bridge/bridge.go

+ 1 - 1
libnetwork/drivers/bridge/bridge.go

@@ -598,7 +598,7 @@ func (d *driver) checkConflict(config *networkConfiguration) error {
 		nwConfig := nw.config
 		nw.Unlock()
 		if err := nwConfig.Conflicts(config); err != nil {
-			if config.DefaultBridge {
+			if nwConfig.DefaultBridge {
 				// We encountered and identified a stale default network
 				// We must delete it as libnetwork is the source of truth
 				// The default network being created must be the only one