Vendoring libnetwork v0.6.2-rc.1 to v1.10.2 branch
Jess Frazelle authored on 2016/02/20 05:39:33... | ... |
@@ -27,7 +27,7 @@ clone git github.com/RackSec/srslog 6eb773f331e46fbba8eecb8e794e635e75fc04de |
27 | 27 |
clone git github.com/imdario/mergo 0.2.1 |
28 | 28 |
|
29 | 29 |
#get libnetwork packages |
30 |
-clone git github.com/docker/libnetwork v0.6.1-rc3 |
|
30 |
+clone git github.com/docker/libnetwork v0.6.2-rc.1 |
|
31 | 31 |
clone git github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec |
32 | 32 |
clone git github.com/hashicorp/go-msgpack 71c2886f5a673a35f909803f38ece5810165097b |
33 | 33 |
clone git github.com/hashicorp/memberlist 9a1e242e454d2443df330bdd51a436d5a9058fc4 |
... | ... |
@@ -1375,6 +1375,14 @@ func (s *DockerSuite) TestUserDefinedNetworkConnectivity(c *check.C) { |
1375 | 1375 |
c.Assert(err, check.NotNil) |
1376 | 1376 |
} |
1377 | 1377 |
|
1378 |
+func (s *DockerSuite) TestEmbeddedDNSInvalidInput(c *check.C) { |
|
1379 |
+ testRequires(c, DaemonIsLinux, NotUserNamespace) |
|
1380 |
+ dockerCmd(c, "network", "create", "-d", "bridge", "nw1") |
|
1381 |
+ |
|
1382 |
+ // Sending garbge to embedded DNS shouldn't crash the daemon |
|
1383 |
+ dockerCmd(c, "run", "-i", "--net=nw1", "--name=c1", "debian:jessie", "bash", "-c", "echo InvalidQuery > /dev/udp/127.0.0.11/53") |
|
1384 |
+} |
|
1385 |
+ |
|
1378 | 1386 |
func (s *DockerSuite) TestDockerNetworkConnectFailsNoInspectChange(c *check.C) { |
1379 | 1387 |
dockerCmd(c, "run", "-d", "--name=bb", "busybox", "top") |
1380 | 1388 |
c.Assert(waitRun("bb"), check.IsNil) |
... | ... |
@@ -200,6 +200,9 @@ func (r *resolver) ServeDNS(w dns.ResponseWriter, query *dns.Msg) { |
200 | 200 |
err error |
201 | 201 |
) |
202 | 202 |
|
203 |
+ if query == nil || len(query.Question) == 0 { |
|
204 |
+ return |
|
205 |
+ } |
|
203 | 206 |
name := query.Question[0].Name |
204 | 207 |
if query.Question[0].Qtype == dns.TypeA { |
205 | 208 |
resp, err = r.handleIPv4Query(name, query) |