Member
TTL is actually a UINT32 with most significant bit unset for BC reasons as per https://tools.ietf.org/html/rfc2181#section-8. This will not affect "normal" operation as the most significant bit should not be set by compliant implementations and we will now interpret this accordingly.
It's probably best to limit the TTL to a much lower value, such as one day, to mitigate the effect of a successful cache poisoning attack.
@kelunik Indeed, the policy for that shouldn't live in the parser.
jsor approved these changes Nov 5, 2018