0

I try to debug my reverse DNS request subroutine, and I need a DNS that's longer than 40 characters, because apparently that's how many bytes Dnsapi reserves in memory.

So I want to see what happens when NameHost in a PTR structure exceeds 40 bytes. Specifically, I expect that the reserved memory for the structure is going to be extended and padded with 0s, but I need to test that.

So does anyone know a DNS longer than 40 characters? Something like verylonglabel1.verylonglabel2.example.com.

Simon
  • 3,973
Chris
  • 329

1 Answers1

7

So does anyone know a dns longer than 40 characters?

No, but I typed world's longest domain name into Google and found this:

www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com

Now I do.

40 characters, because apparently that's how many bytes Dnsapi reserves in memory.

Noting that 40 characters is not necessarily 40 bytes (Unicode), you might want to read the documentation, I did and I couldn't find anything to suggest a 40 byte limit.

This RFC doesn't seem to suggest any arbitrary limits on DNS records in this regard, at least from a cursory glance.

ta.speot.is
  • 14,323