generated serial is too long
mmitch opened this issue · comments
nsd from Debian Buster does a proper check of the serial number and errors out, because the currently generated YYYYMMDDhhmmss is much more than a 32 bit unsigned integer:
current value: 20190723001745
maximum allowed: 4294967295
We need to shorten our pattern. We also need to keep the 1 second resolution to avoid duplicate serial numbers.
Possible fixes:
- use unix timestamp
- pro: signed 32bit integer, so it fits even after the rollover in 2038
- con: not readable by a mere human
- skip the year
- pro: easy to parse by a human
- pro: this script is thought to be called multiple times per day, so the year is not really relevant
- cons: none yet (?)
- use an abstract atomic counter instead of a timestamp-derived number
- pro: sub-second resolution, no need for the
sleep 1
hack to ensure unique timestamps - con: time of last update not contained in DNS information
- con: hard to implement (concurrent access to simple text file)
- pro: sub-second resolution, no need for the
Looks like "skip the year" to me.