Integer types for SOA fields

Barry Margolin barmar at genuity.net
Thu Dec 20 15:57:38 UTC 2001


In article <9vrgtf$rhe at pub3.rc.vix.com>, Dave Carmean <dlc at halibut.com> wrote:
>Greetings...
>
>...are the DNS SOA refresh/retry/expire/negative TTL values signed or
>unsigned 32-bit integers?  It seems that the default and per-record TTL is
>/signed/ 32-bit (or unsigned 31-bit :o), but RFC1035 almost seems to indicate
>that all other times are uint32.  (Not that I ever plan to use a value that
>large; I'm creating a class library.)
>
>I.e. the maximum TTL is 2^31-1, but are the max refresh/retry/expire/negative 
>TTL values all 2^32-1?

RFC 1035 frequently mentions data values that are unsigned explicitly, but
the only place where it ever says "signed" explicitly is in reference to
TTLs.  My interpretation of this is that the default is assumed to be
signed.  Also, these are all times, so it makes sense that they would be
treated similarly.

On the other hand, negative values of Refresh, Retry, and Expire make no
sense.  Then again, neither do negative values of TTL, yet they're
explicitly stated to be signed.

I suspect no one gave it a whole lot of thought when writing the RFC, since
2^31 seconds is 68 years, and Refresh/Retry values that high are utterly
ridiculous.  One could possibly make a case for such long Expire times, but
the difference between 68 and 136 years is probably inconsequential
(they're both effectively infinite).

-- 
Barry Margolin, barmar at genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list