Browse Source

bridge: fix error handling for stale default gateways

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Petros Angelatos 7 năm trước cách đây
mục cha
commit
72eed906b8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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