Browse code

vendor: bump libnetwork ef149a924dfde2e506ea3cb3f617d7d0fa96b8ee

fix https://github.com/moby/moby/issues/40715

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>

Jintao Zhang authored on 2020/03/19 18:15:58
Showing 4 changed files
... ...
@@ -3,7 +3,7 @@
3 3
 # LIBNETWORK_COMMIT is used to build the docker-userland-proxy binary. When
4 4
 # updating the binary version, consider updating github.com/docker/libnetwork
5 5
 # in vendor.conf accordingly
6
-: "${LIBNETWORK_COMMIT:=beab24292cb13d13670985fc860215f9e296bd47}"
6
+: "${LIBNETWORK_COMMIT:=ef149a924dfde2e506ea3cb3f617d7d0fa96b8ee}"
7 7
 
8 8
 install_proxy() {
9 9
 	case "$1" in
... ...
@@ -38,7 +38,7 @@ github.com/gofrs/flock                              392e7fae8f1b0bdbd67dad7237d2
38 38
 # libnetwork
39 39
 
40 40
 # When updating, also update LIBNETWORK_COMMIT in hack/dockerfile/install/proxy.installer accordingly
41
-github.com/docker/libnetwork                        beab24292cb13d13670985fc860215f9e296bd47
41
+github.com/docker/libnetwork                        ef149a924dfde2e506ea3cb3f617d7d0fa96b8ee
42 42
 github.com/docker/go-events                         9461782956ad83b30282bf90e31fa6a70c255ba9
43 43
 github.com/armon/go-radix                           e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
44 44
 github.com/armon/go-metrics                         eb0af217e5e9747e41dd5303755356b62d28e3ec
... ...
@@ -34,11 +34,11 @@ func setupIPForwarding(enableIPTables bool) error {
34 34
 		if err := configureIPForwarding(true); err != nil {
35 35
 			return fmt.Errorf("Enabling IP forwarding failed: %v", err)
36 36
 		}
37
-	}
38
-
39
-	// Set the default policy on forward chain to drop only if the
40
-	// daemon option iptables is not set to false.
41
-	if enableIPTables {
37
+		// When enabling ip_forward set the default policy on forward chain to
38
+		// drop only if the daemon option iptables is not set to false.
39
+		if !enableIPTables {
40
+			return nil
41
+		}
42 42
 		if err := iptables.SetDefaultPolicy(iptables.Filter, "FORWARD", iptables.Drop); err != nil {
43 43
 			if err := configureIPForwarding(false); err != nil {
44 44
 				logrus.Errorf("Disabling IP forwarding failed, %v", err)
... ...
@@ -484,7 +484,7 @@ func (r *resolver) ServeDNS(w dns.ResponseWriter, query *dns.Msg) {
484 484
 			resp, err = co.ReadMsg()
485 485
 			// Truncated DNS replies should be sent to the client so that the
486 486
 			// client can retry over TCP
487
-			if err != nil && !resp.Truncated {
487
+			if err != nil && (resp != nil && !resp.Truncated) {
488 488
 				r.forwardQueryEnd()
489 489
 				logrus.Debugf("[resolver] read from DNS server failed, %s", err)
490 490
 				continue