I think that second reference has a couple errors, and this has nothing to do with IP packets (datagrams).
As js2 notes, the entire DNS message has to be prefixed with a 2 byte field (and they seem to have omitted that in their diagram at the top of the page, the DNS header is 14 bytes, not 12 for TCP). That is the limiting factor. The DNS server doesn't really care what the underlying limits of the TCP stack are or whether the response fits in a single IP datagram (that likely needs to be split up).
As they seem to figure out the actual limit is RD payload + DNS overhead <= 64k bytes. What they are forgetting is that the TCP segment overhead means that this maximum wouldn't fit in a single IP datagram anyhow. Since the minimum TCP header size is 20 bytes any DNS message >65514 bytes will have to be split.
In practice none of this matters though as the OS had better make the TCP maximum segment size less than the MTU to avoid fragmentation, often something 1460 or less.
Any DNS query substantially over that is going to be going in multiple IP datagrams.
As js2 notes, the entire DNS message has to be prefixed with a 2 byte field (and they seem to have omitted that in their diagram at the top of the page, the DNS header is 14 bytes, not 12 for TCP). That is the limiting factor. The DNS server doesn't really care what the underlying limits of the TCP stack are or whether the response fits in a single IP datagram (that likely needs to be split up).
As they seem to figure out the actual limit is RD payload + DNS overhead <= 64k bytes. What they are forgetting is that the TCP segment overhead means that this maximum wouldn't fit in a single IP datagram anyhow. Since the minimum TCP header size is 20 bytes any DNS message >65514 bytes will have to be split.
In practice none of this matters though as the OS had better make the TCP maximum segment size less than the MTU to avoid fragmentation, often something 1460 or less. Any DNS query substantially over that is going to be going in multiple IP datagrams.