moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.1k stars 187 forks source link

Mac: handle large DNS result sets #474

Open djs55 opened 5 years ago

djs55 commented 5 years ago

This incorporates

https://github.com/mirage/ocaml-osx-dnssd/pull/14

backported to the opam-1.2 branch.

Signed-off-by: David Scott dave.scott@docker.com

djs55 commented 5 years ago

It looks like mirage-dns cannot cope with responses larger than 4096 bytes:

2019-04-05 16:02:59.149108+0100  localhost com.docker.vpnkit[27974]: XXX returning 420 answers
2019-04-05 16:02:59.149380+0100  localhost com.docker.vpnkit[27974]: Lwt.async failure (Invalid_argument
  "Cstruct.blit_from_string src=[7] dst=[4092,4](4096) dst-off=0 len=7"): Raised at file "stdlib.ml", line 34, characters 20-45
Called from file "lib/name.ml", line 144, characters 18-66
Called from file "lib/name.ml", line 152, characters 24-40
Called from file "lib/packet.ml", line 1204, characters 10-76
Called from file "lib/packet.ml", line 1312, characters 24-99
Called from file "list.ml", line 117, characters 24-34
Called from file "lib/packet.ml" (inlined), line 1494, characters 4-46
Called from file "lib/packet.ml", line 1508, characters 23-69
Called from file "src/hostnet/hostnet_dns.ml", line 380, characters 18-52
Called from file "src/hostnet/hostnet_dns.ml", line 442, characters 31-54
Called from file "src/core/lwt.ml", line 1866, characters 23-26
thaJeztah commented 4 years ago

Does this relate to https://github.com/docker/for-mac/issues/4430, ?

avsm commented 3 years ago

Is this fixed by #542 and the latest dns?

djs55 commented 3 years ago

Not sure. I think what I need to do is create a convincing test case to check.