[ldns-users] ldns & TTL
Willem Toorop
willem at nlnetlabs.nl
Thu Nov 25 10:46:15 UTC 2021
Andreas,
Thanks for the references!
Op 25-11-2021 om 11:20 schreef A. Schulze:
> so I think, any implementation should
>
> - reject negative values as input -> fail/error
Agree.
> - convert any positive input larger then 2^31 - 1 as zero -> silent or with warning
I don't know. I think it should at least be possible to create such
records with ldns, maybe with a "force" (-F) option? And without that
option produce warnings (if above a certain verbosity level).
The "force" (-F) option might also be usable to deal (accept) high NSEC3
iteration counts perhaps.
> - only use 0 <= TTL <= 2^31 - 1 as output
Again I'm not sure. I would prefer to print that what was in the wire
data with least interference. But maybe we could in this case have some
sort of "fix" or "strict" option?
I do think anything like this should be postponed till after the 1.8.0
release though. But, please keep the discussion and suggestions going
(if only to keep momentum) and then let's have a 1.8.1 release with the
outcome of that soonish, okay?
Cheers,
-- Willem
>
> right?
>
> Andreas
>
>
>
>
>>
>> Cheers,
>> -- Willem
>>
>> Op 24-11-2021 om 17:05 schreef Willem Toorop via ldns-users:
>>> Hi Andreas,
>>>
>>> Op 24-11-2021 om 16:54 schreef A. Schulze via ldns-users:
>>>> Hello,
>>>>
>>>> in a discussion about valid TTL values I noted unexpected output while feeding different TTL into ldns-read-zone.
>>>>
>>>> To reproduce use something like this:
>>>> TTL=$( echo 'value' | bc ); echo "foo $TTL TXT \"TTL=$TTL\"" | ldns-read-zone
>>>>
>>>> value output
>>>> ------------------------------------------------------------------
>>>> 2^31 - 1 foo. 2147483647 IN TXT "TTL=2147483647"
>>>> 2^31 foo. -2147483648 IN TXT "TTL=2147483648"
>>>> 2^31 + 1 foo. -2147483647 IN TXT "TTL=2147483649"
>>>>
>>>> 2^32 - 1 foo. -1 IN TXT "TTL=4294967295"
>>>> 2^32 foo. 0 IN TXT "TTL=4294967296"
>>>> 2^32 + 1 foo. 1 IN TXT "TTL=4294967297"
>>>>
>>>> RFC 1035 define a TTL as "positive values of a signed 32 bit number"
>>>> which mean to me, anything larger then 2^31 - 1 is invalid.
>>>
>>> There has been an errata (in 2012) changing this to an unsigned 32 bit
>>> number: https://www.rfc-editor.org/errata/eid2130
>>>
>>> So ldns is printing it wrong! I'll fix that.
>>> Just in time for the 1.8.0 release!
>>>
>>> Thanks,
>>> -- Willem
>>>
>>>
>>>>
>>>> Could the readers please clarify about
>>>> - the maximum value per RFC
>>>> - whether these output of ldns-read-zone is correct
>>>>
>>>> Btw: I used ldns-1.8.0-rc.2
>>>>
>>>> Thanks,
>>>> Andreas
>>>>
>>>>
>>>> _______________________________________________
>>>> ldns-users mailing list
>>>> ldns-users at lists.nlnetlabs.nl
>>>> https://lists.nlnetlabs.nl/mailman/listinfo/ldns-users
>>>>
>>> _______________________________________________
>>> ldns-users mailing list
>>> ldns-users at lists.nlnetlabs.nl
>>> https://lists.nlnetlabs.nl/mailman/listinfo/ldns-users
>>>
More information about the ldns-users
mailing list