moby / vpnkit

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

dns: set the TC bit and truncate if UDP response > 512 bytes #470

Closed djs55 closed 5 years ago

djs55 commented 5 years ago

From https://www.ietf.org/rfc/rfc1035.txt

4.2.1. UDP usage

Messages sent using UDP user server port 53 (decimal).

Messages carried by UDP are restricted to 512 bytes (not counting the IP or UDP headers). Longer messages are truncated and the TC bit is set in the header.

Reported as [docker/for-mac#2160]