Bugzilla – Bug 234
Fix parsing of serial & TTL values.
Last modified: 2009-02-19 12:18:06 CET
Created attachment 99 [details]
Changes in attached patch (regarding serial):
- serial must be number in range from 0 to 4294967295 (UINT_MAX), negative numbers and odd stuff like "-3dhs" or "dwdwdwdwdw" are not allowed anymore,
- show proper error message when parsing bad serial in zone file ("serial is expected" instead of "time period is expected").
Changes in attached patch (regarding TTL):
- TTL values can't be negative anymore (they were casted to uint32_t anyway),
- $TTL value 4294967295 (UINT_MAX, 0xFFFFFFFF or (int32_t)-1) is now allowed,
- parser->default_minimum is now removed (it was never used anway).
Please note that parsing of TTL values is still far from perfect.
This is fixed in trunk, will be in next release.
Also, I have included a change so that not the whole zone will be skipped during parsing (because the TTL or ORIGIN directive failed).