Closed timcharper closed 8 years ago
A workaround can be seen in my fork: https://github.com/vivint-smarthome/mesos-dns
Thanks @timcharper. Aside from the miekg dns client upgrade, looks like the related mesos-dns changes are here https://github.com/vivint-smarthome/mesos-dns/commit/66562b7f3ade6bdf1a812f83ed9076d09ddb79f5
@jdef you bet. I should mention there are issues with my change. It does not appropriately forward the Truncated bit (I've confirmed with wireshark). Its better, but flawed in that regard. I'll need to do some additional hunting to fix it further.
I'm unsure how my workaround will affect DNS caching. It's not important in my specific use case, I don't care if I get a truncated DNS record in any of my clients. However, it might affect others negatively.
With the targeted version of miekg dns client, if the DNS server for which mesos-dns is forwarding requests returns a response with the truncated bit set, then the dns client returns a response with effectively no answers. The truncation is happening here:
https://github.com/mesosphere/mesos-dns/blob/3564f1eb20a5d77e068d38b6fcebe60fbb1b7ef3/vendor/github.com/miekg/dns/msg.go#L1703
This effectively means that if a Forwarded DNS server responds with truncated messages, then mesos-dns returns no answers.
Ideally, mesos-dns should forward on the response as much as possible, indicating that the response was truncated.