diff --git a/components/engine/hack/dockerfile/install/proxy.installer b/components/engine/hack/dockerfile/install/proxy.installer index bfad1a721ed..887a0db13df 100755 --- a/components/engine/hack/dockerfile/install/proxy.installer +++ b/components/engine/hack/dockerfile/install/proxy.installer @@ -3,7 +3,7 @@ # LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When # updating the binary version, consider updating github.com/docker/libnetwork # in vendor.conf accordingly -: ${LIBNETWORK_COMMIT:=0025177e3dabbe0de151be0957dcaff149d43536} +: "${LIBNETWORK_COMMIT:=90afbb01e1d8acacb505a092744ea42b9f167377}" install_proxy() { case "$1" in diff --git a/components/engine/vendor.conf b/components/engine/vendor.conf index 0be5d884ca6..7e1dbaa877b 100644 --- a/components/engine/vendor.conf +++ b/components/engine/vendor.conf @@ -38,7 +38,7 @@ github.com/gofrs/flock 392e7fae8f1b0bdbd67dad7237d2 # libnetwork # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly -github.com/docker/libnetwork 0025177e3dabbe0de151be0957dcaff149d43536 +github.com/docker/libnetwork 90afbb01e1d8acacb505a092744ea42b9f167377 github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9 github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80 github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec diff --git a/components/engine/vendor/github.com/docker/libnetwork/controller.go b/components/engine/vendor/github.com/docker/libnetwork/controller.go index dc33ded09e7..5a499aa4284 100644 --- a/components/engine/vendor/github.com/docker/libnetwork/controller.go +++ b/components/engine/vendor/github.com/docker/libnetwork/controller.go @@ -825,7 +825,7 @@ func (c *controller) NewNetwork(networkType, name string, id string, options ... err = c.addNetwork(network) if err != nil { - if strings.Contains(err.Error(), "restoring existing network") { + if _, ok := err.(types.MaskableError); ok { // This error can be ignored and set this boolean // value to skip a refcount increment for configOnly networks skipCfgEpCount = true diff --git a/components/engine/vendor/github.com/docker/libnetwork/firewall_linux.go b/components/engine/vendor/github.com/docker/libnetwork/firewall_linux.go index d27f60ca0c8..54f9621f813 100644 --- a/components/engine/vendor/github.com/docker/libnetwork/firewall_linux.go +++ b/components/engine/vendor/github.com/docker/libnetwork/firewall_linux.go @@ -2,7 +2,6 @@ package libnetwork import ( "github.com/docker/libnetwork/iptables" - "github.com/docker/libnetwork/netlabel" "github.com/sirupsen/logrus" ) @@ -10,44 +9,15 @@ const userChain = "DOCKER-USER" func (c *controller) arrangeUserFilterRule() { c.Lock() - - if c.hasIPTablesEnabled() { - arrangeUserFilterRule() - } - + arrangeUserFilterRule() c.Unlock() - iptables.OnReloaded(func() { c.Lock() - - if c.hasIPTablesEnabled() { - arrangeUserFilterRule() - } - + arrangeUserFilterRule() c.Unlock() }) } -func (c *controller) hasIPTablesEnabled() bool { - // Locking c should be handled in the calling method. - if c.cfg == nil || c.cfg.Daemon.DriverCfg[netlabel.GenericData] == nil { - return false - } - - genericData, ok := c.cfg.Daemon.DriverCfg[netlabel.GenericData] - if !ok { - return false - } - - optMap := genericData.(map[string]interface{}) - enabled, ok := optMap["EnableIPTables"].(bool) - if !ok { - return false - } - - return enabled -} - // This chain allow users to configure firewall policies in a way that persists // docker operations/restarts. Docker will not delete or modify any pre-existing // rules from the DOCKER-USER filter chain. diff --git a/components/engine/vendor/github.com/docker/libnetwork/vendor.conf b/components/engine/vendor/github.com/docker/libnetwork/vendor.conf index 78b8379fd4c..ab8b2bcec92 100644 --- a/components/engine/vendor/github.com/docker/libnetwork/vendor.conf +++ b/components/engine/vendor/github.com/docker/libnetwork/vendor.conf @@ -51,5 +51,5 @@ golang.org/x/sync 1d60e4601c6fd243af51cc01ddf169918a5407ca github.com/pkg/errors ba968bfe8b2f7e042a574c888954fccecfa385b4 # v0.8.1 github.com/ishidawataru/sctp 6e2cb1366111dcf547c13531e3a263a067715847 -gotest.tools b6e20af1ed078cd01a6413b734051a292450b4cb # v2.1.0 +gotest.tools 1083505acf35a0bd8a696b26837e1fb3187a7a83 # v2.3.0 github.com/google/go-cmp 3af367b6b30c263d47e8895973edcca9a49cf029 # v0.2.0